• Resolved Robin

    (@robin-ho)


    I recently upgraded to WooCommerce 7 at the same time as upgrading a lot of other stuff, including Avada Theme.

    After upgrading the quantity selector has appeared on all my products, which it shoudn’t, as everything is unique.

    It seems the markup has changed and I’m not sure if it’s due to a WooCommerce change or something else, can you please advise?

    Before

    After

    • This topic was modified 1 year, 10 months ago by Robin.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Its a design decision. See:
    https://github.com/woocommerce/woocommerce/issues/36007

    There were inconsistencies in terms of how the quantity input renders across a couple of scenarios, so the idea was to render it in a more consistent fashion, albeit set it to ‘readonly’ in cases where it should not be changed (sold individually being one of those).

    The idea was simply to make it obvious to customers that the quantity they are purchasing is one (or, a higher but still unchangeable quantity, in other contexts). Of course, based on the discussion here it seems that is not optimal in all cases.

    There are various CSS workarounds that can be applied.

    .sold-individually .quantity { display: none; }
    /* may vary by theme */
    Thread Starter Robin

    (@robin-ho)

    Thank you!

    @lorro

    Thank you for the fix.

    I didn’t want to start a new post but…..

    is there a way to also remove the quantity selector on the cart page?

    The issue still shows there.

    Thank you

    .shop_table th.product-quantity,
    .shop_table td.product-quantity {
      display: none;
    }

    But that’s going to hide it for all products. There isn’t a css selector for sold-individually products. To hide it only for certain products would need php deveopment skills.

    Thank you for the solution ??

    Hi @robin-ho @wooguy

    Thanks for reaching out!

    I’m glad you were able to find a solution to your inquiry here and kudos to @lorro for sharing it with the community too! ??

    I will be marking this thread as resolved. Should you have further inquiries, kindly create a new topic here.

    Thanks!

    Thread Starter Robin

    (@robin-ho)

    @wooguy, I just checked my site and the quantity selector was always there for me once you’re in the basket (at least on my theme), so I don’t think that part has actually changed.

    • This reply was modified 1 year, 9 months ago by Robin.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Quantity selector has appeared after upgrade’ is closed to new replies.