Stock change to out of stock when inventory levels go below set threshold

My client has asked if products can change to out of stock when they reach stock levels of 5.

Currently, products are integrated with their point of sale software (Vend) and simply show out of stock when stock levels are 0.

My client is worried that once levels are below 5, there could actually be times where someone orders online but stock has then sold in store and there won’t actually be stock to fulfill the order.

I can’t see any apps that would do this, is it possible in anyway?

Hello @EmmaEshloe ,

You have to write a condition
If product inventory is less than or equals to 5 show sold out else leave default code as it is.

Thanks

Thanks for your suggestion. I am not a developer and don’t have experience with this - is this something I would need to do in the code?

Yes you need to edit the code.

Hi @EmmaEshloe ,

We have a physical store, and we are having the same issue. Did you find any solution?

Thanks

Zdemir - We solved this using Draft Orders + Stock Reservation. We did a video on it here - https://youtu.be/mRUcIfXICOw

Basically what you do is create a Draft Order on Shopify from the Shopify Admin, add all of the items you want to reserve to the draft then reserve the stock. You can set a particular day to release it back, or set the date for a really long time. Once you’ve saved that order, to check its working have a look at the Inventory tab and see if its marked as unavailable due to the draft order you created.

Hope that helps, thanks, Andy

Emma We solved this using Draft Orders + Stock Reservation. We did a video on it here - https://youtu.be/mRUcIfXICOw

Basically what you do is create a Draft Order on Shopify from the Shopify Admin, add all of the items you want to reserve to the draft then reserve the stock. You can set a particular day to release it back, or set the date for a really long time. Once you’ve saved that order, to check its working have a look at the Inventory tab and see if its marked as unavailable due to the draft order you created.

Hope that helps, thanks, Andy

I am looking to do this exact thing for our wholesale website so that it shows the variant as out of stock when inventory is below 10 (the order minimum). Right now, any item below 10 is listed as “X units remaining”, but still allows the customer to purchase in a unit of 10 because ee need the “continue selling when out of stock” option selected in order to allow the preorder option to function.

Does anyone know what this code would be and where it would need to be placed in the theme?

Hello @Kelbourne ,

You can use this code

{% assign inventory_qty = product.selected_or_first_available_variant.inventory_quantity %}

{% if inventory_qty <= 0 %}
  

Out of stock

{% endif %}

code location depend on the theme and theme version you are using.

And if you need to use it variant change then you use Javascript for it.

Regards
Guleria