We have two problems caused when there’s insufficient stock of a product. Firstly, if a customer tries to add more than the available product into the basket, it appears that nothing happens. (you don’t get the added to basket message, or insufficient stock message). Then when they look in the basket, they see there’s only the maximum available that’s been added. This isn’t great, but it’s no big deal. For example, customer adds 3 t-shirts in a certain size into their basket, but only 2 are in stock. Basket icon looks empty, but after looking at basket it updates to show 2 t-shirts.
The second problem is more annoying. If said customer then increases the number of that t-shirt in the basket from 2 to 3, the basket redirects to “Your basket is empty” page. Then when going back to the basket, it again shows the 2 available t-shirts. Why is there a redirect on error, rather than a message indicating insufficient stock? Any help much appreciated.
The end of our cart-template.liquid looks like this:
# {{ 'cart.general.title' | t }}
{{ 'cart.general.empty' | t }}
{{ 'cart.general.cookies_required' | t }}
[{{ 'general.404.link' | t }}{% include 'icon-arrow-right' %}](https://oursiteaddress.com/)