All things Shopify and commerce
Hello, I want to hide the prices of my products on both home page collection, and all the other collections on Shopify Dawn Theme 11.0.0 , I've been trying to put old codes but they dont seem to work. Please help.
Solved! Go to the solution
This is an accepted solution.
For the homepage featured product: Navigate to Online Store > Themes > Customize. Click on the Featured Product section and hide the "Price" block by clicking on the eye that appears on the right hand side when you hover over it.
To hide on Featured Collections or Main Collections page you'll need to do some custom coding. Navigate to Online Store > Themes > "..." Edit Code. Find the snippet file titled "price.liquid". Around line 50, after the " BUT before the > you'll add:
{% if template.name contains "collection" or template.name contains "index" %} style="display: none;" {% endif %}
So that whole chunk of could should look like:
<div
class="
price
{%- if price_class %} {{ price_class }}{% endif -%}
{%- if available == false %} price--sold-out{% endif -%}
{%- if compare_at_price > price and product.quantity_price_breaks_configured? != true %} price--on-sale{% endif -%}
{%- if compare_at_price > price and product.quantity_price_breaks_configured? %} volume-pricing--sale-badge{% endif -%}
{%- if product.price_varies == false and product.compare_at_price_varies %} price--no-compare{% endif -%}
{%- if show_badges %} price--show-badge{% endif -%}
" {% if template.name contains "collection" or template.name contains "index" %} style="display: none;" {% endif %}
>
You should be able to hide the price in the WYSIWYG editor. Navigate to Online Store > Themes > Customize. Click on the Product section and hide the "Price" block by clicking on the eye that appears on the right hand side when you hover over it. You may have to repeat this process again on the product pages in addition to the featured product or collection just once. It should apply to all products if they use the same template.
No, I dont want it removed from product page, only to remove it from home page and collections.
This is an accepted solution.
For the homepage featured product: Navigate to Online Store > Themes > Customize. Click on the Featured Product section and hide the "Price" block by clicking on the eye that appears on the right hand side when you hover over it.
To hide on Featured Collections or Main Collections page you'll need to do some custom coding. Navigate to Online Store > Themes > "..." Edit Code. Find the snippet file titled "price.liquid". Around line 50, after the " BUT before the > you'll add:
{% if template.name contains "collection" or template.name contains "index" %} style="display: none;" {% endif %}
So that whole chunk of could should look like:
<div
class="
price
{%- if price_class %} {{ price_class }}{% endif -%}
{%- if available == false %} price--sold-out{% endif -%}
{%- if compare_at_price > price and product.quantity_price_breaks_configured? != true %} price--on-sale{% endif -%}
{%- if compare_at_price > price and product.quantity_price_breaks_configured? %} volume-pricing--sale-badge{% endif -%}
{%- if product.price_varies == false and product.compare_at_price_varies %} price--no-compare{% endif -%}
{%- if show_badges %} price--show-badge{% endif -%}
" {% if template.name contains "collection" or template.name contains "index" %} style="display: none;" {% endif %}
>
User | RANK |
---|---|
41 | |
39 | |
24 | |
22 | |
22 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023