2

I have a number of products which have a minimum quantity set as follows:

<input class="span1" type="text" name="item_qty" value="{min_order_qty}" placeholder="Quantity">
<button class="btn btn-primary"><i class="icon-shopping-cart"></i> Add To Cart</button>

However, if the client were to change the value to something less than the {min_order_qty} and try adding to cart, it simply posts the form and goes to the value set in my return="" param without erroring.

Whilst it doesn't trigger any kind of error, it also doesn't add the item to the cart, it just seems to fail quietly.

I would have expected it to trigger some kind of error message if I try adding quantity less then the minimum, rather than just failing silently, which is what it's doing.

Anyone able to offer advice on this?

3
  • Do you have error code in place to print the error?
    – Anna_MediaGirl
    Commented Jan 14, 2014 at 16:00
  • Hi Anna, I can't even see in the documentation where/how I would display an error... unless I've missed something. Commented Jan 14, 2014 at 17:19
  • Can you post the outer Store tags that surround the code you posted above?
    – Anna_MediaGirl
    Commented Jan 14, 2014 at 19:04

1 Answer 1

1

I believe this is expected behavior. Historically there has been no error handling in the add to cart form (I think this is the only error state it could possibly get into anyway).

One solution if you are using minimum order quantities is to add JavaScript validation to your product page. This will result in a nicer error message for your customers anyway. If you don't already have a library, Parsley.js is fantastic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.