Site logo

Archived topic

products 'sold individually' have erroneous +/- qty buttons on cart page

12 replies · Started by Natalie on April 1, 2023

Viewing posts 1–13 of 13

My woocommerce products are set up to be ‘sold individually’.
https://u.pcloud.link/publink/show?code=XZp7zwVZ5mEIXEHUW9uXlC9W2M6FLyQIXkOX

On the cart page the quantity is not displayed (as expected) but the +/- buttons still show

https://u.pcloud.link/publink/show?code=XZ17zwVZRLNxk8NQrz8fuOQRJRM91FtSvtCy

If I disable the 'woocommerce' module in GP Premium then the +/- buttons are correctly hidden
https://u.pcloud.link/publink/show?code=XZN7zwVZsgRpa3QPwoppeK7cETd24XkxXUmV

I am using GeneratePress 3.3.0 and GP premium 2.3.1

Just checking whether this is being looked at. Thanks

Hi there,

apologies your topic slipped through our system.

if you disable the Quantity Buttons in the Customizer > Layout > Buttons, does the cart qty field disappear ?

umm.. couldn't find Customizer > Layout > Buttons

What I did was go to
Customizer > Layout > Woocommerce
and untick
'Display quantity buttons'

This removes the +/- buttons in the cart BUT I do want the +/- buttons for products that AREN'T 'sold individually'

The thing is GP is not consistent.

With 'Display quantity buttons' unticked this is what the cart look like with two products, one 'sold individually' and one not

https://u.pcloud.link/publink/show?code=XZxgWwVZfCaK7zGjoK7QSDmihOmiauD7OJ7k

So you can see there are 'up/down' arrows for the product that is NOT 'sold individually' and no arrows for the product that is sold individually.

When I tick the 'Display quantity buttons' option in GP, this is what the same cart looks like:
https://u.pcloud.link/publink/show?code=XZFPWwVZRFuPh5iGuLpvzs1j6MEe15RHhPn7

the +/- buttons shouldn't be there for the product that is 'sold individually'

Thanks

Hi Natalie,

With ‘Display quantity buttons’ enabled, can you try adding this through Appearance > Customize > Additional CSS?:

.quantity:has(input[max="1"]) {
    display: none;
}

Thanks
I tried that but it didn't work

Can you point us to a specific product that is not "individually sold"?

this one
/product/alns-a3-course-lesson-planner/

The code seems to be working for me. See: https://share.getcloudapp.com/JrupGZw2

What browser are you using?

Can you try this instead?:

.woocommerce-cart .do-quantity-buttons div.quantity {
    display:none;
}
.woocommerce-cart .do-quantity-buttons div.quantity.buttons-added {
    display:flex;
}

well that was unexpected

the first custom css that you suggested doesn't work in firefox but it works in other browsers
(I just checked on caniuse.com and it seems firefox doesn't yet support :has() )

The second set of custom css seems to work in all browsers, so I'll go with that

Is this something you expect to fix in a future version of GP premium?

Thanks

great. Thanks!

You're welcome, Natalie!

This archived topic is closed to new replies.