Shopping Cart Quantity Input and Append - Keep Buttons Together

Open to all! Ask other shopowners for help.
Post Reply
User avatar
Cary
Member
Posts: 34
Joined: Fri Mar 12, 2021 9:36 pm
Phoenix Version: v1.0.9.1
Has thanked: 3 times
Been thanked: 3 times

Shopping Cart Quantity Input and Append - Keep Buttons Together

Post by Cary »

The shopping cart (shopping_cart.php) buttons to update the quantity or delete item were constantly flowing under to the next line whenever the screen size was reduced. Especially on mobile devices. From a visual aspect it drove me crazy. So I believe I found the solution to lock them together using the user.css file (/templates/override/static/user.css).
Simply add

Code: Select all

.input-group {flex-wrap: nowrap}
to the css file which overrides the default input-group and locks the qty, update and remove fields together.

The !important property doesn't seem to be required so don't add it unless needed. My understanding is that you don't use that property unless the override isn't affected. This might impact another area that uses the .input-group but I didn't find any after a quick search.

Hope this helps you if needed/wanted.
-Cary
- Cary


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Shopping Cart Quantity Input and Append - Keep Buttons Together

Post by Kofod95 »

Thank you for sharing this.
I believe you could add

Code: Select all

.sc-product-listing
to make sure it only affects the shopping cart.
I'm not at my PC, so I can't check, but most modules have a div with a class specific to that module to allow individual styling of content :)

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
User avatar
ReneH4
Contributor
Posts: 145
Joined: Mon Oct 26, 2020 12:00 pm
Phoenix Version:
Has thanked: 13 times
Been thanked: 17 times

Re: Shopping Cart Quantity Input and Append - Keep Buttons Together

Post by ReneH4 »

This has bothered me from the beginning of Phoenix too (no offence to the developers).

I will definetly go and try this! Thanks for sharing!


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply