View Product Page

How to set quantity restrictions

The quantity control can be globally managed from the plugin settings dashboard or specifically on single products.

In YITH -> Minimum Maximum Quantity -> General settings you can configure the restriction rules for:

  • cart: the user can’t proceed with the checkout if the number of products added to the cart doesn’t fulfill the inserted values. For further details about the settings, go to this page.
  • products: the quantity limits are applied to all the products of the shop (unless the product provides different settings). For further details about the settings, go to this page.
  • categories: the quantity limits are applied to all the shop categories. This means the total product quantity of each category must correspond to the specified limits. If you want to exclude the category from the general limits, enable “Exclude category” that you find on the WooCommerce category page. For further details about the settings, go to this page.
  • tag: the quantity limits are applied to all the shop tags. The total products must correspond to the limits for each tag in the cart. If you want to exclude a tag from the general limits, enable “Exclude tag” that you find on the WooCommerce tags page. For further details about the settings, go to this page.

The restriction rules can be combined. Pay attention to their compatibility.
The general rules can be overridden on single product. If this doesn’t happen, the system will apply the quantity restriction rules based on the following priority ascending order:

  • rules by tag
  • rules by category
  • rules by product

Cart restrictions

Through the Cart restrictions settings available in the General settings tab, you can prevent users from checking out if the number of products added to the cart or the spend amount doesn’t fulfill the values you have configured.

Cart quantity restrictions

Cart restrictions

Enable the option Enable cart quantity restrictions if you want to set a minimum and a maximum number of products that must be added to the cart to complete the order.

  • Minimum quantity restriction: this defines the minimum number of items in the cart. If you don’t want to apply any restriction, set the value to 0;
  • Maximum quantity restriction: this defines the maximum number of items in the cart. If you don’t want to apply any restriction, set the value to 0;
  • Quantity groups of: define the number of products that must be purchased in groups (e.g. groups of 5 products);
Cart restriction message

Enable the option Enable cart spend restrictions if you want to prevent users from completing their order if the amount is higher or lower than the values you have specified.

  • Minimum spend restriction: this defines the minimum spend for products in the cart. If you don’t want to apply any restriction, set the value to 0;
  • Maximum spend restriction: this defines the maximum spend for products in the cart. If you don’t want to apply any restriction, set the value to 0;
  • Include shipping rates and relative fees: enable this option if you want to include the shipping fees in the amount calculated for the restriction;
  • Prevent coupons calculation: enable this option if you want to exclude coupons from the amount calculated for the restriction.
Cart spend restriction message

The values inserted in the settings dashboard are general and applied to all the categories and/or tags.
The system checks that the total amount of the products of each category and/or tag fulfills the specified limits.

To exclude a category or a tag from the general restrictions, go to WooCommerce category page and enable the option Exclude. On the contrary, if you want to override the global restrictions enable the option Override quantity restrictions and/or Override spend restrictions.

Override category restrictions

Product restrictions

Through Product restrictions settings available in the General settings tab, you can prevent users from checking out if the number of products added to the cart or the spend amount doesn’t fulfill the values you have configured.

Product restrictions

Enable the option Enable product quantity restrictions if you want to set a minimum and a maximum number of products that must be added to the cart to complete the order.

  • Minimum quantity restriction: this defines the minimum number of items for each product to be added to the cart. If you don’t want to apply any restriction, set the value to 0;
  • Maximum quantity restriction: this defines the maximum number of items for each product to be added to the cart. If you don’t want to apply any restriction, set the value to 0;
  • Quantity groups of: this defines the number of products that must be purchased in groups (e.g. groups of 4 products);
  • Unlock variation quantities: enable this option if you want to calculate the product quantity as the sum of all variations of variable products. (E.g. by setting the minimum quantity to 4, users will be able to add to cart 2 variations A, 1 variation B, and 1 variation C).
Product restrictions example

The values inserted in the settings dashboard are general and applied to all the products.

To exclude a product from the general restrictions, go to WooCommerce product page and enable the option Exclude product. On the contrary, if you want to override the global restrictions enable the option Override product restrictions and specify the new values.

Override product restrictions

Category restrictions

Through Category restrictions settings available in the General settings tab, you can prevent users from checking out if the number of products added to the cart or the spend amount doesn’t fulfill the values you have configured for product categories.

Category restrictions

Enable the option Enable category quantity restrictions if you want to set a minimum and a maximum number of products with a specific category that must be added to the cart to complete the order.

  • Minimum quantity restriction: this defines the minimum number of items for each product category to be added to the cart. If you don’t want to apply any restriction, set the value to 0;
  • Maximum quantity restriction: this defines the maximum number of items for each product category to be added to the cart. If you don’t want to apply any restriction, set the value to 0;
  • Category quantity groups of: this defines the number of products belonging to the same category that must be purchased in groups (e.g. groups of 2 of the category Clothes);
Category restriction message

Enable the option Enable category spend restrictions if you want to prevent users from completing their order if the amount is higher or lower than the values you have specified for the categories.

  • Minimum spend restriction: this defines the minimum spend for product categories in the cart. If you don’t want to apply any restriction, set the value to 0;
  • Maximum spend restriction:  this defines the maximum spend for product categories in the cart. If you don’t want to apply any restriction, set the value to 0;
Category spend restriction message

To exclude a category from the general restrictions, go to the WooCommerce category page and enable the option Exclude. On the contrary, if you want to override the global restrictions enable the option Override quantity restrictions and/or Override spend restrictions.

Override category restrictions

Tag restrictions

Through Tag restrictions settings available in the General settings tab, you can prevent users from checking out if the number of products added to the cart or the spend amount doesn’t fulfill the values you have configured for tags.

Tag restrictions

Enable the option Enable tag quantity restrictions if you want to set a minimum and a maximum number of products with a specific tag that must be added to the cart to complete the order.

  • Minimum quantity restriction: this defines the minimum number of items for each product tag to be added to the cart. If you don’t want to apply any restriction, set the value to 0;
  • Maximum quantity restriction: this defines the maximum number of items for each product tag to be added to the cart. If you don’t want to apply any restriction, set the value to 0;
  • Tag quantity groups of: this defines the number of products with a specific tag that must be purchased in groups (e.g. groups of 2 for the tag Small).
Tag restriction message

Enable the option Enable tag spend restrictions if you want to prevent users from completing their order if the amount is higher or lower than the values you have specified for the tags.

  • Minimum spend restriction: this defines the minimum spend for product tags in the cart. If you don’t want to apply any restriction, set the value to 0;
  • Minimum spend restriction: this defines the minimum spend for product tags in the cart. If you don’t want to apply any restriction, set the value to 0;
Tag spend restriction message

To exclude a tag from the general restrictions, go to WooCommerce tag page and enable the option Exclude. On the contrary, if you want to override the global restrictions enable the option Override quantity restrictions and/or Override spend restrictions.

Override tag restrictions

Quantity groups

An additional quantity restriction is given by the possibility to compel the user to purchase the products as default groups, such as lots including 2,3, or 6 products.

Specify the number of groups to purchase the product in “Quantity groups of”.

According to the previous quantity restrictions, this option can be configured for all products in the cart, or by categories, tags, or on a product basis.

To set quantity groups, go to YITH > Minimum Maximum Quantity > General Settings.

Quantity groups

If you need to set quantity group restrictions on specific products, open the product edit page and set up the option in the Minimum Maximum Quantity tab.

Override groups of option on specific product

How to set restrictions on variable products

By default, the quantity restrictions apply to each product variation, that is if you set the minimum quantity to 10, the users will need to add to the cart 10 items for every variation. If you want to change this behavior and sum all the variations when calculating the quantity, you need to enable the option Unlock variation quantities that you can find in the tab General settings > Product restrictions.

Unlock variation quantities

You can override the global settings from the edit page of the variable product as follows:

– go to the Minimum Maximum Quantity section and enable the option Exclude Product if you don’t want to apply any quantity restriction on the product or enable the options Override product restrictions and Enable variation restrictions.

Enable variation restrictions

-Now go to the Variations section, and set your restriction rules in every single variation.

Restrictions on single variations

You can set different quantity limits for each variation.

How to enable messages to show in the site

Purchase rules

You can show the complete list of the purchase rules on the product detail page: in this way, your users will know the necessary conditions to purchase on your e-commerce site.

Go to Message settings, enable “Show rules on product page” and choose the spot on the page where you want to show the rules.

Purchase rules message

Example

Purchase rules message

Cart error message

In the Message settings section, you can customize the error messages that will be displayed in “Cart” page. This way, users will be informed about the changes they have to do to validate their cart and so proceed to the checkout step.

Cart page error messages

Example

Cart page message example

Add to cart error message

In the Message settings section, under the “Add to Cart” Error Messages entry, you can find the complete list of all those messages that can be displayed to users when they add a product to the cart and an error condition happens. Activate or deactivate the displaying of these messages from the correlated option.

Example

Add to cart error message

Please note: the string of the error message shown for Add to cart is managed by the browser, not by the plugin.

Bulk actions

The general restrictions can be overridden in YITH -> Minimum Maximum Quantity -> Bulk Actions by creating rules for products, categories, and tags. To create a new rule, click on Add rule.

Add new bulk actions rule

Now you can start configuring specific quantity and spend limits for one or more products, categories, and tags.

Products

Products rule

Categories

Categories rule

Tags

Tags rule

Note: the products excluded from configured restrictions are marked with a particular symbol in the cart.
Product excluded from the rule - example

Blocks

The plugin is ready to use with the new Gutenberg editor. When you add a new post or page, you will be able to find our YITH block. With a simple click, it will be added to your page.

Gutenberg block