Stock states are custom labels you can put on stock levels between X and Y – e.g. Only a few left when stock is between 1 and 10, In Stock for stock over 10, and Out of stock for stock lower than 1. This can be useful in scenarios where stock is not directly retrieved from an ERP system, and stock levels on the website are therefore not always precise enough. It may also be used for stylistic purposes.
Stock states collections are created and managed from Settings > Ecommerce > Orders > Stock state:
- Click New stock state Figure 1.1)
- Name the stock state collection
- Add a number of states using the Add new state button
- For each state, set a label and define when it is used – you can also set a Delivery time, a unit and an icon
When you’re done click Save and close.
To use a stock state collection:
- Go to Settings > Ecommerce > Product Catalog > Shops
- Select a shop and open the shop settings
- Under Default stock state select the stock state collection
Once a shop has a stock state collection defined you should be able to access the appropriate values in your templates.