Do someone know how to make products that are out of stock visible on the Shopify website?
thank you very much for your reply
i did this and still the product is not visible
the stock qty is also marked as 0
is there some other reason?
track Qty is also with check?
By default, Shopify automatically hides products that are out of stock from your online store. However, you can modify your theme to show products that are out of stock if you wish.
Here are the steps to display out of stock products in your Shopify store:
-
From your Shopify admin, click on âOnline Storeâ and then âThemesâ.
-
Click on âActionsâ and then âEdit codeâ for the theme you want to modify.
-
In the left-hand column of the code editor, click on the âSectionsâ folder to expand it.
-
If your theme has a
product-template.liquidorcollection-template.liquidfile, click on it to open it in the editor. Otherwise, click on the âTemplatesâ folder, then click on theproduct.liquidfile. -
Find the code that generates the âAdd to cartâ button for the product. This code will usually include a conditional statement that checks whether the product is in stock. For example, it might look like this:{% if product.available %}
Add to cart
{% else %}Out of stock
{% endif %} -
To display out of stock products, remove the conditional statement that checks for product availability. For example, you can change the code to:
css
<button>Add to cart</button> <p>{% if product.available == false %}Out of stock{% endif %}</p> -
- Click âSaveâ to save your changes.
With these changes, your theme will display the âAdd to cartâ button for all products, regardless of whether they are in stock or not. Out-of-stock products will display a message indicating that they are out of stock.
Note that this modification may affect the user experience of your website. Customers may get confused when they try to buy an out-of-stock item or it might create a bad impression.
Hi @Ralitsa ,
Thanks for reaching out and sharing the link below. I just browsed through your store and it looks like out-of-stock products are being displayed on the website, as shown below. Did you enable this in the meantime?
Itâs a good idea to hide the products when theyâre out-of-stock, especially if you donât plan to stock them again. However, if you plan to restock them, especially soon, keeping them on your website is more beneficial.
Even though a product is sold out, that doesnât mean you have to miss out on sales. You can offer pre-orders so customers can purchase the product while youâre working on getting it restocked. This can lock in some sales and will allow you to determine the demand for the product, making it easy to forecast inventory. You can add this feature to your store by using preorder apps.
Alternatively, you can enable back-in-stock notifications so customers are notified once the product is restocked. This is another way to secure sales as the customers who sign up for these alerts have the intent to purchase. You can enable back-in-stock notifications by using back-in-stock apps.
Iâm currently trying to do the same however when i go into the program to edit codes, I do not have âproduct template liquidâ, âcollection template liquidâ or âproduct liquidâ.
I am using the minimal theme, so i can only imagine its not available. Is it possible to add this in still using the minimal theme?
I also read online that doing this would become complicated if you have multiple variations of each thing, in my case i do. Is this correct?
Weâre looking at hundreds of products to go online, no deadline for the shop to launch but we would love to have some things online with the âsold outâ badge available.
Any help would be appreciated, this is my 3rd time using Shopify so I am still winging it!
You said that the default is to not have out of stock items appear on the website, but thatâs exactly what mine is doing? Do you know how I make it so that out of stock items are not on my website? Any help would be so appreciated!
