Tutorial to set a minimum number of required products in WooCommerce

A Premium Student (hello Pilar) has asked me for a tutorial to add a mandatory minimum quantity of a certain product to her WooCommerce store when making a product.

How to do it we are going to use a plugin called Min/Max Quantities what does more things let's explain them all 😉

Among the things we will learn in this tutorial is:

  • Configure the minimum quantity of products required to place the order
  • Configure the maximum number of products required to place the order
  • Set minimum spend in the shopping cart to place the order
  • Configure maximum spending in the shopping cart to place the order
  • Set a product to be compulsorily purchased in groups of X units

And we can do all of the above to all the products at the same time or only to the product that we need.

You can buy the WooCommerce extension here or if you are a premium member You have it available for free in the members area.

Video tutorial

Subscribe to my channel:  

Once we have the plugin installed if we go to WooCommerce –> Settings –> Products we find new options:

settings min max quantities

From these options we can configure the behavior in all the products at the same time. Later we will see how to exclude this behavior to a specific product.

Configure the minimum quantity of products required to place the order

Minimum Order Qty: To make a specific number of products mandatory in the purchase process, we only have to put how many products we want to make mandatory in this option.

If, for example, we make the minimum quantity of 3 products mandatory:

woocommerce minimum quantity

When we go shopping and add less than three products to the cart, it will notify us that the order cannot be made:

minimum amount cart

Of course the notice can be translated into Spanish with the plugin Loco Translate

When we add more than 3 products to the cart, the notice will be removed and we will be able to place the order.

Configure the maximum number of products required to place the order

Just as we have configured a minimum of products in the cart, we can establish a maximum of products, just adding the number of products in the option Maximum Order Qty

Set minimum spend in the shopping cart to place the order

As simple as putting the minimum amount in the option «Minimum Order Value».

For example, if we set a minimum order of €50 and place a lower order, the following will happen:

woocommerce minimum order

Of course, in addition to the notice that we have not reached €50, it does not allow us to complete the purchase process:

purchase process not allowed

Configure maximum spending in the shopping cart to place the order

It would be done in the same way as in the previous case but filling in the field «Maximum Order Value» with the maximum purchase value allowed.

Set a product to be compulsorily purchased in groups of X units

To configure a product to be purchased compulsorily in groups of X units, we can do it in two ways:

Product Categories

We can define it to a specific category, in this way all the products of a category have to be acquired in this way.

If we edit a product category we find the field «Group of…»

group off category

If, for example, we put "2", from now on any product in that category can only be purchased two at a time:

2 group

concrete product

We can define this option within each product:

group of product

In the same way that we can configure a product to be purchased in a group of products, we can configure the maximum and minimum number in which we allow it to be purchased.

In addition, we can exclude a specific product from the obligation defined for all products.

The exclusions that we can create are the following:

product exclusions

Order rules: Do not count If we check this option, what will happen is that if we have established that the minimum number of products is 3, this product would not count to reach that figure. In other words, if we add to the cart, for example, 7 units of this product, we will still need 3 units of other products to complete the purchase process.

Order rules: Exclude If we mark this option, what will happen is that this product is exempt from the generally defined obligation. In other words, if we have created the obligation to buy at least 3 units of product, we can only buy one of this particular product.

Category rules: Exclude The same exclusion as the previous one but instead of the rule defined at the level of all the products, it would be the one that we have defined at the category level.

You can buy the WooCommerce extension here or if you are a premium member You have it available for free in the members area.

As we can see, it is an apparently simple plugin but it allows us a very interesting variety of options.

I hope you like it 😉

regards
Oscar

Leave a comment