If stock level exceeded, nothing gets added to cart

Your theme has this functionality.

However, there are 2 problems:

First, in your assets/shop.js find function doAjaxAddToCart and inside this function there is this code:

$(".ajax-error-message").text(e.parseJSON(n.responseText).description);

this should be

$(".ajax-error-message").text($.parseJSON(n.responseText).description);

e → $

This should bring your error message box back.

However, contents of the box are white text on white background – probably something you can change in the theme settings.
Or can add the following to the very bottom of your frame.scss(.liquid ?) asset:

.ajax-error-modal .modal-inner {
  color: red;
}
1 Like