Display error Messages by AJAX
in WooCommerce
Hi,
when a user tries to add a product in the cart above the available stock, it is displayed anything, so is pretty confusing for the buyer.
The only way for the user to see a massage about what's happening is when it reloads the page or goes to the cart, checkout or another product.
Related to that, if it's enable the Page Cache, if the user that has generated the error, and generates the page cache for that product or the pages listed above; all the other user will see a page with an error that they haven't generated.
For me, it is best to display errors by AJAX, in this way the page shouldn't be reloaded and is compatible with page caching.
Comments
Hi,
Can you attach a link to the product where I can see that, please?
I have checked that in my environment, and when the product has limited stock, then the plus button does not allow to go over the stock value.
Moreover, when you put a higher value by hand, there is a message.
I do not want to misunderstand you, so it would be best if you explain it in more detail, and attach an example of it.
Thanks
Sure,
this is a link to a product: https://www.sporttechs.it/giacche/giacca-caccia-uomo-thunder-univers-91125/
Thanks
Thank you. I will pass it to the dev team to resolve this problem.
Thanks