Site logo

Archived topic

Quantity buttons on woo composite products

6 replies · Started by Laura on July 7, 2022

Viewing posts 1–7 of 7

Hi ,
Im building a client site and in the testing of composite products plugin we noticed a slight bug

When you first load a composite product page all increase and decrease quantities work, however when you choose a differant option than the default the buttons cease to work , you can still type in a number but the buttons do nothing

I read the support thread here : ive read https://generatepress.com/forums/topic/add-to-cart-banner-not-showing-on-bundle-products/#post-1690182

And switching Display quantity buttons off in customizer clears the issue.

Obviously we want to display the buttons on the site and have composite functionality.

Any thoughts

Thanks

Laura.

Also I really like the most recent update dynamic data etc. Gamechanger

Hi,

The problem happens if you change your mind on which product you'd like.

To reproduce the issue:

1. choose base hop #1 and change the quantity.
2. change your mind and swap to base hop #2.
3. Quantity + and - buttons no longer work.
4. Swap back to the original base hop #1 (just in case it's related to the choice).
5. You still cannot change the quantity.

(This happens on all of the product choices).

If you turn "Display quantity buttons" off in customizer clears the issue. (It also doesnt happen if you swap themes).

Expected behaviour:

1. pick a product
2. change quantity
3. change the product
4. quantity now applies to new product (and can be changed).

Thanks!
Laura

Hi there,

not sure there is much we can do about that, as the GP Quantity button links are injected into the form on load.
And the component products are ajax loading, so when you switch product, the links don't get injected.

I am going to run this past Tom to see of there is an easy solution.
But it may just be a case that the Qty Buttons will have to be disabled with that Woo extension.

Ah, I hope there is - your buttons look SO much better and are far easier to use on Mobile. :)

Many thanks
Laura

Another quick question - is there a way to only disable those buttons on this one product?

Thanks
Laura

Hi there,

Not sure there's a solution for this, at least within the forum here.

However, you can disable the buttons on the one product like this:

add_filter( 'option_generate_woocommerce_settings', function( $settings ) {
    if ( is_singular( 'Your product title' ) ) {
        $settings['quantity_buttons'] = false;
    }

    return $settings;
} );

Let me know if that helps or not :)

This archived topic is closed to new replies.