Replacing the Price Tag of Sold Out items with a "Sold Out" label (Symmetry Theme) Help

CamrinAce
New Member
5 0 0

IMG_9062.jpeg

Hi all, hope everyone is well.

I recently started using the symmetry theme and I would like to replace the price tag of Sold Out items with a "Sold Out" label only on the collection page. I still want the price to be shown on the product page, however. I provided a picture above for reference. Is there any code I can add that can give me a result like this?

 

Thank you!


My website is: https://www.newworldvisionz.com

password is: nwv2

 

Replies 2 (2)

JoesIdeas
Shopify Expert
2228 203 593

In your theme editor look for the template collection.liquid, that will likely have some included sections or snippets, follow those, read the code to find where the price is shown, then create a conditional statement to show "Sold Out" if inventory is less than 1.

 

Something like this:

{% if current_variant.inventory_quantity < 1 %}
  <span class="sold-out-collection">Sold Out</span>
{% else %}
  your normal code that already exists would remain here
{% endif %}

 

If you're not familiar with Liquid and are not hiring a developer, this will help you to learn: https://shopify.dev/docs/api/liquid

 

Make sure you duplicate your live theme, then work on the new duplicated theme so you can edit and preview before it goes live.

• Creator of Order Automator (automate tagging, fulfillment, Amazon, notifications + more)
• Shopify developer for 10+ years, store owner for 7 years
• I also make guides like Shopify Automation Tips and How to Deal with Fraud / Chargebacks
CamrinAce
New Member
5 0 0

I checked and my theme doesn’t have a collection.liquid template