All things Shopify and commerce
Hi team,
I am trying to hide the price of Product when the Product Type is "XYZ" but couldn't figure out how to do this.
I'm using the Taste theme. The website is not live yet, so I can't share a link.
Could someone please help.
Thank you,
Chesea
Solved! Go to the solution
This is an accepted solution.
To hide it on collection pages
in file snippets/card-product.liquid
Search for
{% render 'price', product: card_product, price_class: '' %}
and replace it with
{% if template contains "collection" %}
{% unless card_product.type == "XYZ" %}
{% render 'price', product: card_product, price_class: '' %}
{% endunless %}
{% else %}
{% render 'price', product: card_product, price_class: '' %}
{% endif %}
Thanks
Hello There,
Please share your store URL and password.
So that I will check and let you know the exact solution here.
Hi ZestardTech,
Sorry I don't think I'm being clear in my question.
I wanted to hide the Product price on the Collection Page when the Product Type is XYZ.
Here is the URL of the collection page: https://inspireddiy.myshopify.com/collections/inspiration-staircases
The password is: cheing
Thank you,
Chelsea
In file sections/main-product.liquid
Search for ' {%- when 'price' -%}'
and
replace
<div class="no-js-hidden" id="price-{{ section.id }}" role="status" {{ block.shopify_attributes }}>
{%- render 'price', product: product, use_variant: true, show_badges: true, price_class: 'price--large' -%}
</div>
to
{% unless product.type == "XYZ" %}
<div class="no-js-hidden" id="price-{{ section.id }}" role="status" {{ block.shopify_attributes }}>
{%- render 'price', product: product, use_variant: true, show_badges: true, price_class: 'price--large' -%}
</div>
{% endunless %}
Hi Pawankumar,
Thank you for the reply. I managed to find the exact section you mentioned and made the changes but it didn't work. The price is still showing for product types that are "XYZ".
Is there anything else I could do.
Thank you,
Chelsea
Can you please share product url with product type "XYZ" ( with password if your store password is enabled )?
Thanks!
Hi Pawankumar,
Sorry I don't think I'm being clear in my question.
I wanted to hide the Product price on the Collection Page when the Product Type is XYZ.
Here is the URL of the collection page: https://inspireddiy.myshopify.com/collections/inspiration-staircases
The password is: cheing
Thank you,
Chelsea
This is an accepted solution.
To hide it on collection pages
in file snippets/card-product.liquid
Search for
{% render 'price', product: card_product, price_class: '' %}
and replace it with
{% if template contains "collection" %}
{% unless card_product.type == "XYZ" %}
{% render 'price', product: card_product, price_class: '' %}
{% endunless %}
{% else %}
{% render 'price', product: card_product, price_class: '' %}
{% endif %}
Thanks
Thanks so much Pawankumar. That works.
Hello Pawankumar, I have similar query, I want prices for all products in Coming soon, Collections, and featured to be displayed only for customers who are logged in, can Ass to cart be enabled only for logged in customer, I am using Taste theme, can you pls guide
Hi @Swm24
You can use the below idea for specific collection and logged in customer
{%- if template contains "collection" and collection.handle == "your-handle-here" -%}
Your collection specific code here
{%- endif -%}
{%- if customer -%}
This code will appear only for logged in customer
{%- endif -%}
To make actual implementation, you will require liquid knowledge, You can apply the above idea if you are looking for something like this
Thanks!
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025