• Resolved bernibernal

    (@bernibernal)


    Good afternoon, I would like to know if there is any code or complement, with which a different minimum quantity could be established, that the user should buy, for each attribute of a variable product.

    All the best.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @bernibernal!

    Thanks for getting in touch in the WooCommerce forum.

    The Min/Max Quantities extension for WooCommerce allows you to define minimum and maximum allowable quantities per variation which is something that WooCommerce alone won’t do by default. Does this work for you?

    If not, you’d need help from a developer to define a feature for the minimum quantity for each attribute. If you would like to investigate that possibility further, you could reach out to some of the official WooCommerce development partners via this link – https://woocommerce.com/experts/.

    Extensions in the marketplace come with a 30 day refund policy so you can test out Min/Max Quantities and check if it works right for you, or you can get your money back if it’s not what you’re looking for.

    Cheers.

    Thread Starter bernibernal

    (@bernibernal)

    Thank you very much @rainfallnixfig yes your information is useful to me, although I was looking for a code or a free solution, but thank you very much for your help.

    In fact, I have a code that limits the quantity to 50 of all my variable products, but I cannot find the solution to be able to segment this quantity by the attributes of my products. The code is the following:

    function woocommerce_available_variation( $args ) {
    $args[‘max_qty’] = 1000; // Maximum value (variations)
    $args[‘min_qty’] = 50; // Minimum value (variations)
    return $args;
    }

    add_filter( ‘woocommerce_available_variation’, ‘woocommerce_available_variation’ ); // Variations`

    Hi @bernibernal

    I understand that you want to be able to segment the total quantity (of 50) by attributes.

    For help with modification of the code, we recommend reaching out at the following channels for any development-oriented questions:

    You can also reach out to someone on our customizations page.

    * Support for custom coding is beyond the scope of support we are able to provide in this forum. This particular forum is for questions that are related to the WooCommerce core features.

    Thread Starter bernibernal

    (@bernibernal)

    Thanks @margaretwporg !!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Different minimum quantity for each attribute’ is closed to new replies.