All things Shopify and commerce
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I have some products that are sold out and some that are coming soon. I have changed the 'sold out' text in the language settings but want to just hide this text completely for products which are actually sold out.
I don't want to hide by product.type as these are filled in specifically for shipping. Can it be done by a collection or tags?
I use Dawn theme
Could you the link to your store so I can check?
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
Or you can try to add this code to your theme.liquid file, after <head> in Online Store > Themes > Edit code to check
<style>
.card:has(.price--sold-out) .card__badge { display: none !important; }
</style>
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
I cant see theme.liquid as a file
It should be there under Layout folder, try to search theme only
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
FOund this. And it does hide the 'sold out' box (that id changed for 'coming soon'. But i would like to only hide this on certain products. Can't be based on the product type as this is already populated for other reasons so can we hide the 'coming soon' for anything with a 'sold out' tag
It will hide the badge of sold-out products only.
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
So i have some products that are 'coming soon' that i want the badge to show for but i want to hide for actual sold out products. As both have 0 stock they just all show as coming soon even if some have been sold for a while but are now sold out. I want to hide the coming soon message for products that i choose and keep for the ones that are coming soon.
can i add code to hide the 'sold out/coming soon' message for products that i have assigned a certain tag to?
It is a personal store for a client therefore password protected.
Hello @Shopquestion234
You'll need to modify your Dawn theme's code.
{% for variant in product.variants %} {% if variant.available %} {% else %} {% endif %} {% endfor %}
{% for variant in product.variants %} {% if variant.available %} {% else %} {% if product.tags contains 'coming_soon' or product.collections contains 'preorder_collection' %} {% else %} <span class="sold-out">Sold Out</span> {% endif %} {% endif %} {% endfor %}
I don't have the product-template.liquid in my theme?