Home Forums WoodMart support forum maximum number of variations

maximum number of variations

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

    oguz187
    Participant

    Hi,

    if I create a product with just 6 variations, the way it’s displayed and the calculation on the front end works perfect… If I create 46 variations, the calculation doesn’t work corectly. Woocommerce shows ALL variations in the dropdown, even though those I didn’t setup, so the customer gets a message “product is not available”.

    PHP cofiguration: The max_input_vars is 3000 and memory_limit is 256

    I don’t know why this happen when I create too many variations.

    best regards

    #258914

    Artem Temos
    Keymaster

    Hi,

    Please, describe to us your problems in a bit more details. Attach some screenshots and provide us with a list of steps on how to reproduce it on your website.

    Thank you in advance.

    #258983

    oguz187
    Participant

    Hi,

    meanwhile I found the solution for this issue.
    Woocommerce has a limit of 30 different variations. If you have more than 30 variations, it will be not displayed corectly in the front end (all variations will be shown, so the customer have to find out which combination of variation is corectly set up)

    Now you have to add this code in the functions.php of your Theme.

    function custom_wc_ajax_variation_threshold( $qty, $product ) {
    return 200;
    }
    add_filter( ‘woocommerce_ajax_variation_threshold’, ‘custom_wc_ajax_variation_threshold’, 100, 2 );

    This worked for me.

    best regards

    #259244

    Artem Temos
    Keymaster

    Yes, that is correct. We are glad that you sorted it out. Is there anything that we might help you with?

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