Solved

How to show out of stock products on listings but disable 'add to cart' button (by product type)

eleewok
Visitor
2 1 1

Hello, does anyone know how to do the following?

Some items in the shop are pre-made - limited number in stock, available to buy as is. Once the items are out of stock, they need to show on the listing pages, without letting customers add to basket and order any more.

Other items however are 'made to order' and will always show as having 0 in stock - these need to be available to 'add to basket' and for customers to buy at any time.

 

The difference between the products is the type - any idea how to filter the 'add to cart' button, to disable or allow sales when an item is out of stock, based on product type?

Accepted Solution (1)

eleewok
Visitor
2 1 1

This is an accepted solution.

Please ignore 🙂 I figured out how to get this working by finally understanding how the 'track inventory' works.

 

For anyone who doesn't know, I'll try and explain.

 

Pre-made items ready to ship, set the number of items in stock in Products. For custom items which are made-to-order, set quantity to 0.

 

If you enable 'track inventory' on products (can do it in bulk as well which is great), you then see the additional option which is something like 'allow sales when sold out'. Can't remember wording.

 

This means if a pre-made item goes out of stock, it shows in the listing but says 'sold out' and you can't buy any more. But items which are always set as 0 quantity, as in out-of-stock, do not show as 'sold out' and can be bought 🙂

 

Hope this helps someone!

View solution in original post

Replies 2 (2)

eleewok
Visitor
2 1 1

This is an accepted solution.

Please ignore 🙂 I figured out how to get this working by finally understanding how the 'track inventory' works.

 

For anyone who doesn't know, I'll try and explain.

 

Pre-made items ready to ship, set the number of items in stock in Products. For custom items which are made-to-order, set quantity to 0.

 

If you enable 'track inventory' on products (can do it in bulk as well which is great), you then see the additional option which is something like 'allow sales when sold out'. Can't remember wording.

 

This means if a pre-made item goes out of stock, it shows in the listing but says 'sold out' and you can't buy any more. But items which are always set as 0 quantity, as in out-of-stock, do not show as 'sold out' and can be bought 🙂

 

Hope this helps someone!

PrathamG
Visitor
1 0 0

Does this work to prevent orders when there are 500+ active visitors waiting to buy a limited stock product released at a specific announced date & time? Thundering herd problem.