Site logo

[Resolved] products ‘sold individually’ have erroneous +/- qty buttons on cart page

Home Forums Support [Resolved] products ‘sold individually’ have erroneous +/- qty buttons on cart page

Home Forums Support products ‘sold individually’ have erroneous +/- qty buttons on cart page

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #2592648
    Natalie

    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

    #2596206
    Natalie

    Just checking whether this is being looked at. Thanks

    #2596384
    David
    Staff
    Customer Support

    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 ?

    #2597248
    Natalie

    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

    #2597281
    Fernando
    Customer Support

    Hi Natalie,

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

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

    Thanks
    I tried that but it didn’t work

    #2597291
    Fernando
    Customer Support

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

    #2597331
    Natalie

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

    #2597351
    Fernando
    Customer Support

    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;
    }
    #2597374
    Natalie

    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

    #2597416
    Fernando
    Customer Support
    #2597418
    Natalie

    great. Thanks!

    #2597444
    Fernando
    Customer Support

    You’re welcome, Natalie!

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.