Hide price when sold out [all free themes]
Your product just went out of stock and you want to hide its price in the meanwhile? Look no further! In this quick tutorial I'll be showing you how to hide the price of all of your sold out products in the Dawn theme.
Here is a live preview of how the end result will look like. In this example, the option “Black / XXL” is sold out.
Making a backup of your current theme
Before diving into the tutorial make sure you download the theme, so in case you face any issues you can easily revert back.
Adding the code to your theme
- From your Shopify Admin go to: online store > themes > actions > edit code
- Find the file named exactly “main-product.liquid”
- Paste the following code at the very bottom of the file:
Conclusion
That is it – now all of the sold out products will automatically have their prices hidden.
You may also like
Here are some other tutorials you may be interested in. They work with “Dawn” plus all Shopify's free themes (Craft, Refresh, Colorblock, Taste, Ride, Studio, Crave, Origin, Spotlight, Publisher & Sense):
– Arrows & vertical thumbnails for Dawn's product pages
– Dawn lightbox: responsive images, slider and arrows
– Improve your website's safety: block right click, image copying and more
Was this article helpful?