How to show on shopify products that are out of stock

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:

  1. From your Shopify admin, click on “Online Store” and then “Themes”.

  2. Click on “Actions” and then “Edit code” for the theme you want to modify.

  3. In the left-hand column of the code editor, click on the “Sections” folder to expand it.

  4. If your theme has a product-template.liquid or collection-template.liquid file, click on it to open it in the editor. Otherwise, click on the “Templates” folder, then click on the product.liquid file.

  5. 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 %}
  6. 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>

    1. 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.

1 Like

www.ginger-home.bg

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.

1 Like

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!