How can I limit the stock counter on a product page?

hello

I’m trying to get the stock counter in the product page and cart page not go over the available stock, I don’t want the client to put the stock then it puts the out of stock message, I want the counter to be limited from the product page. want to grey out the plus that they cannot add more than the available quantity. I DO NOT want them to get any message.

961sneakers.com pass:12345678

theme: ride

thank you

hi @MarketingAux ,

So basically, you want limited the quantity product not go over the avaliable the stock, when the client add to cart, right?

But if the client add the quantity go over the stock, so what do thing happen? => make the add to cart button cannot submit or show the warring?

The issue you rase need customize directly code:

  1. Determinate the current stock.

  2. Check current cart item and behavior’s user hit into button plus/minus and when add to cart.

Hello @DitalTek

let’s say the stock limit is 3, when the counter reaches 3, the increase or add arrow will lock or disappear, and for the stock, I already have them set in each product

hi @MarketingAux ,

I got it, so that issue need implement logic with code combine some trick,

  • Basecily, you need put a flag in each product as like the number limit, then you will check behavior of user onto add to cart button and plus/minus quantity input, if they add quantity go over the number limit, the button will disappear.

How can I do it

hi @MarketingAux

Do you have familiar working with code? Because that issue need implement with code, and need to handling some place as like this => when the user click add to cart button and on to plus/minus button.

It will combine between liquid and js.

Thanks!

Not Really

I see, so you can try do it first and then if you want some one take over the issue, you can let me know.

I didn’t know

i got it, so if you need implement, you can take see around my signature, thanks!

Didn’t understand