Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I want to remove the price for products on the product card when the price is zero. I basically don't want to show zeros when the product is free. Can someone help me please?
Solved! Go to the solution
This is an accepted solution.
Hi, please find the following in product-grid-item.liquid file:
<p class="product__grid__title">{{ product.title }}</p>
Add {% if current_variant.price >0 %} just below it in a new line.
Then, similarly find <span class="unit small">{{ current_variant.unit_price | money }}{{ unit_price_separator }}{{ unit_price_base_unit }}</span>
and add {% endif %} in a new line just below it.
If this does not solveyour problem entirely, you may need to make a similar change in product-liquid file after <span data-product-price...
This is an accepted solution.
Hi, please find the following in product-grid-item.liquid file:
<p class="product__grid__title">{{ product.title }}</p>
Add {% if current_variant.price >0 %} just below it in a new line.
Then, similarly find <span class="unit small">{{ current_variant.unit_price | money }}{{ unit_price_separator }}{{ unit_price_base_unit }}</span>
and add {% endif %} in a new line just below it.
If this does not solveyour problem entirely, you may need to make a similar change in product-liquid file after <span data-product-price...
@neeravmakwana Thank you. The solution worked. I just had to go to a different file and also look for the price code as it was a little different than what you provided. I am tech savvy so I was able to figure it out using the information you gave me.
That's wonderful. I hope this time my instructions are better.
Can you please search for <p class="product__price text-center{% if current_variant_sale %} product__price in featured-product.liquid and {% if current_variant.price >0 %} just above it.
Just after that class ends (</p> around line 91), please add {%- endif -%}
Hello, I need to remove the price from being displayed with the product price is set to zero. I have attempted to use the info above but I do not have that particular snippet as an option. I have also searched for that code to no avail. I am using the Express theme. I would greatly appreciate your assistance. Many thanks!
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025