How can I create a CSS code to alert customers about stock limits?

Hi,

I am wondering if someone has or can create a CSS code that will do the following;

Stop or alert a customer when wanting to add say 10 of the same product to cart, but stock of the item is only 5, they will be notified right away before reaching the checkout.

As currently they are able to add as many of that one item as they like but then once viewing their cart to checkout then they are notified and then have to reduce their QTY.

Thanks

Hi @LuckyKidsE ,

It’s not CSS code, it’s JS and Liquid code. You need to do add data inventory to QTY and then put JS code to check case.

It will be more case if your product has variants, you need to set for all variants.

Hope it clear to you.

ok, do you have instructions on how to do this? As it is completely out of my league lol