Table of Content

HomeBlogPlugin UsageHow to manage displayed restri...

How to manage displayed restriction messages on add-to-cart action?

In the WooCommerce Min Max Quantity plugin, you can show custom notifications to the customers once they click on the add to cart button. It is not important in which page they click the add to cart button, whether on the product page, Shop page, Archive page, or anywhere else, the message will display to inform them about the restriction rules and guide them to order the right quantity of products from your store.

To help you easily customize your messages displayed when customers click on the add to cart button, there are some predefined placeholders that you can add to each one, including:

  • {limit}: It shows the minimum and maximum spend or quantity or in a group of limits – based on what you have set in the General settings- to inform the customer about the minimum and maximum spend or quantity that they can order from your store.
  • {cart_quantity}: It displays the total quantity that customers have already added to their carts.
  • {product_name}: It shows the product title which the rule is applied to. 
  • {category_name}: It shows the category title which the rule is applied to. 
  • {tag_name}: it shows the tag title which the rule is applied to. 

To enable restriction message on add-to-cart action, you need to:

  • Navigate to WordPress Dashboard > iThemeland> Min Max Quantity. 
  • Open the Notification tab.
  • Scroll down to see the Add to cart error messages.
enable restriction message on add-to-cart-action
  • Mark Enable massages on Add to cart.
  • Click on the textbook in front of each field and edit the default message if you need. In each message, you can add the allowed placeholders which are mentioned in the caption.
Set add-to-cart error messages on different conditions
  • Click on the Save Options 

Now, let’s review the different massages that you can add to the cart page:

  • Minimum cart quantity not reached: Show the notification when the total quantity of added items to the cart is less than the minimum number of items required in the cart.
  • Maximum cart quantity exceeded: display the notification when the total quantity of items that have been added to the customer cart is more than the maximum number of items required in the cart.
  • Minimum cart spend not reached: Show the notification when the total amount of customer cart is less than the minimum spend required.
  • Maximum cart spend exceeded: Show the notification when the total amount of customer cart is more than the maximum spend required.
  • Minimum product quantity not reached: Notifies customers that the quantity of products has been added to their cart is less than the minimum number of items required in the cart.
  • Maximum product quantity exceeded: The message notifies customers that the quantity of products has been added to their cart is more than the maximum number of items required in the cart.
  • Minimum category quantity not reached: Show the notification when the total quantity of products belonging to a specific category is less than the required quantity.
  • Maximum category quantity exceeded: Show the notification when the total quantity of products belonging to a specific category is more than the required quantity.
  • Product quantity not allowed for this category: The notification informs customers that the items belonging to a specific category must be purchased in groups of x items.
  • Minimum category spend not reached: When the total amount of products from a category that the customers added to their cart is less than the minimum spend required, this notification is displayed.
  • Maximum category spend exceeded: When the total spend for products belonging to a specific category exceeds the maximum spend required, this notification is displayed.
  • Minimum tag quantity not reached: The notification shows that the total quantity of products belonging to a specific tag is less than required.
  • Maximum tag quantity exceeded: The notification shows that the total quantity of products belonging to a specific tag is less more required.
  • Product quantity not allowed for this tag: The message notifies customers that products belonging to a specific tag can only be bought in groups of x items.
  • Minimum tag spend not reached: If the minimum spend required for products belonging to a specific tag has not been reached yet, this notification will be shown.
  • Maximum tag spend exceeded: If the maximum spend required for products belonging to a specific tag is exceeded, this notification will be displayed.

For example, if the minimum required for ordering the product is 2 but the customer tries to add 1 product to the cart, the below notification will appear.

Show error message if condition not met
Like this tutorial?

Do you still have a problem?

If you still have unanswered questions or need custom work for your plugin, contact iThemeland Support.