We will see in this tutorial how you can display the stock on your shopify product page
It is important for your customer to know if you have any units left in stock for your products and it also makes your product page more attractive.
Remember that in this tutorial we will display the real stock that combines all variants. This means that it is not recommended for dropshipping stores because the notion of out of stock is not the same.
You can see the end result on this demo store : https://speed-ecom-tutorials.myshopify.com/products/product-1
Password : Speedecom
Let’s get technical ! 🙂
How to install the code
Go to the code editor of your shopify theme and open the “sections” folder.
Find the product-template.liquid file and use the search bar with Ctrl + F (or cmd + R) to find the line that contains “price”. Here is an example for the Debut theme.
If you can’t find this area try putting a random word at different places and refresh your product page to find the right spot.
You will now copy/paste the following code to that spot
If you want to put it on the featured product of your homepage, you will just have to find the file featured-product.liquid file in the sections folder.
Depending on the theme the name of the file may not necessarily be the same but if it is well coded then it will be 😉.
This tutorial is also available in video format
Hope you found this tutorial helpful !
You have any ideas for new tutorials ? Any questions about this one ? Leave me a comment 😉