Cart Error Handler

What the cart error handler does

When you have enabled Cart Interaction in QuantityLock the Add to cart form will return an error when the product exceeds your product quantity limits. If your theme doesn't correctly handle errors from the request then you can use QuantityLocks Cart Error Handler extension to display the error message.

Most modern Shopify themes display error message, so its worth checking if your theme already supports error handling before using this extension.

When customers see an error

Customers can see a QuantityLock error any time their selected quantity does not match your rules.

  • They add fewer items than required by a Minimum Quantities rule.
  • They add more items than allowed by a Maximum Quantities rule.
  • They try to continue with a quantity that breaks the limit you set for that product.

When this happens, QuantityLock keeps the invalid quantity from going through and displays your Custom validation message so the customer knows how to fix it.

Set up cart error handling

  1. Open QuantityLock in Shopify admin

    In Shopify admin, go to Apps and select QuantityLock.

  2. Create or review a product quantity limit

    Add a product quantity limit for the product you want to control. Use Minimum Quantities if shoppers must buy at least a set amount, or Maximum Quantities if you want to cap how many units they can buy.

  3. Add a clear Custom validation message

    Write a Custom validation message that tells shoppers exactly what quantity is allowed. Keep the message direct so the shopper can correct the quantity without guessing.

  4. Save the rule and test it on your storefront

    Open the product on your storefront and try a quantity that breaks the rule. Confirm that QuantityLock blocks the invalid quantity and shows your custom message.

If you are on the Free Plan, you can still test this workflow using your included 1 x Product quantity limits rule.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us