Hello Shopify Community,
I’m facing an issue with the Stiletto Theme by Fluorescent, and I’m hoping to get some assistance in resolving it. I have products tagged with ‘hide-price’ in my Shopify store, and I want to hide the prices for these specific products across the entire site — particularly in both the quick search results and the main search results.
I have found it easy to remove the prices from the collection & product pages — but need this tagging logic to remove it when these products are mixed in with others.
Here’s the liquid code I’ve tried:
{%- comment -%}
Add a check for the "hide-price" tag here
{%- endcomment -%}
{%- assign hide_price_tag = false -%}
{%- if product.tags contains 'hide-price' -%}
{%- assign hide_price_tag = true -%}
{%- endif -%}
{%- comment -%}
Modify the price display based on the "hide-price" tag
{%- endcomment -%}
{%- if hide_price_tag -%}
<p class="product-price">Inquire for Price</p>
{%- else -%}
assign money_price = price | money
<p class="product-price">{{ money_price }}</p>
{%- endif -%}
And even some CSS code:
/* Hide prices for products with the 'hide-price' tag in quick search results */
.quick-search__result--product[data-tags*='hide-price'] .quick-search__result-price {
display: none;
}
/* Hide prices for products with the 'hide-price' tag in the main search results */
.product-item--product[data-tags*='hide-price'] .product-item__price {
display: none;
}
However, nothing works. The prices for the tagged products are still visible.
I’ve double-checked that the ‘hide-price’ tag is correctly applied to these products in Shopify. I’ve also ensured that the custom CSS is placed in the theme’s CSS file. But despite these efforts, I’m unable to hide the prices for the tagged products.
I’m wondering if there might be something specific to the Stiletto Theme or if I’m missing something. Could anyone with experience in the Stiletto Theme offer some guidance on how to properly hide prices for products with the ‘hide-price’ tag in this theme?
Any insights, suggestions, or alternative methods to achieve this would be greatly appreciated. Thank you for your help!
Question:
- Has anyone successfully hidden prices for products with a specific tag in the Stiletto Theme by Fluorescent?
- Are there any theme-specific nuances I should be aware of when customizing this theme?
Thank you for your time and expertise!