Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

continue selling when out of stock but limiting the pre-order quantity

continue selling when out of stock but limiting the pre-order quantity

NaviUy
Visitor
1 0 2

Hey everyone,

Sorry if this is the wrong place to post this but I'm a little bit stuck.

I'm currently developing for a store who is trying to implement a feature where after an item is sold out, it goes into pre-order. However, it's limited to a certain amount of quantity. Can someone point me in the right direction. I've been trying to look for more details on this but it doesn't seem like anyone has asked or implemented this yet.

For example, there is currently a t-shirt that has 50 in-stock. Once the 50 t-shirts are sold out, it goes into pre-order. But there is only 20 t-shirts in the next shipment. So, I want to limit the t-shirts preorders to 20 only.

I know about the variant setting "continue selling when out of stock" and how it returns variant.inventory_policy  continue but I'm not sure how to control the amount being sold.

I have the idea of allowing orders to continue after sold out and disabling the pre-order button after its at -20 or something but I'm pretty sure that probably not the right approach to this as it also doesn't alter the behavior in cart and would let customers order more than the -20 quantity number.

Thanks

Replies 0 (0)