Home Forums WoodMart support forum Variation combination showing which aren't available

Variation combination showing which aren't available

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #304840

    Soquesto
    Participant

    Hey,

    I got a b2b shop with woocommerce and the woodmart theme. There I got boots with 2 attributes to select from with different possiblities (8×71). Not every of these are available, so I want the other selection to update which are available. Iam importing all of these variations with WPAllimport, which works fine I think.

    Let’s say they got the attributes color and size. 71 colors and 8 sizes. The size “3” is available in 8 colors. So if I choose size 3 in the dropdown, the other selection dropdown should update to only show these 8 available colors and not all 71.
    This doesn’t work here. Do you have any idea how I could manage to do that?

    #304918

    Hello,

    Try to add the following PHP code snippet to the child theme functions.php

    function custom_wc_ajax_variation_threshold( $qty, $product ) {
        return 150;
    }
    
    add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2 );

    This will increase the standard WooCommerce variations number to be loaded with AJAX from 150.

    Kind Regards

    #305002

    Soquesto
    Participant

    That seemed to work. Thank you very much!

    #305147

    You are welcome! If you have any questions please feel free to contact us.

    Best Regards

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Variation combination showing which aren't available’ is closed to new replies.