A user seeks to hide prices for sold-out items in Shopify’s Spotlight theme, both on product grids and individual product pages. Previous solutions for other themes haven’t worked.
Solution Provided:
Wrap existing price code with a conditional statement:
{% if product.available %}
[existing price code]
{% endif %}
Progress Made:
Product pages: Successfully implemented in sections/main-product.liquid by wrapping the price render code within the availability condition. Now displays only “SOLD” without pricing.
Collection pages: Still unresolved. The user located sections/featured-collection.liquid but needs guidance on where exactly to insert the conditional code to hide prices in the product grid.
Current Status:
Partially resolved—awaiting specific instructions for implementing the fix in the featured collection template.
Summarized with AI on October 31.
AI used: claude-sonnet-4-5-20250929.
Thank you, that sounds like a good advice. I am not that familiar with coding. Could you please be more specific? I clicked on edit code on the two pages (featured collection and main product) where the prices show for the sold products.
I was then directed to these two pages in the code editor: sections/featured-collection.liquid and sections/main-product.liquid. Is that where I should write the code?
Where in these pages do I write added code you suggested?
I still have not been able to remove the price for sold products on the featured collection. Where in that featured collection code do it add your suggested code input? When I click on edit code on the featured collection page I am directed to the “sections/featured-collection.liquid” but then I do not understand how to get rid of the price there for the sold products. Please help!
However your suggestion DID work on the main product page. I added your suggested code there and it successfully removed the price and now only shows SOLD when opening each specific product page.
This is where I added it in the “sections/main-product.liquid” and it worked there: