Shopify themes, liquid, logos, and UX
Hello, does somebody know who to turn "$0" to "Free" as a displayed on the product page and collection product grid? I use the theme Sense. Thanks in advance!
Solved! Go to the solution
This is an accepted solution.
Hi @Dvdv,
My bad. It was the liquid code. I just change the product to card_product
Just follow the instructions below
1. Go to Admin page > Online store > themes > Actions > Edit code
2. Open the card-product.liquid under the Snippet folder.
3. Find the code below.
{% render 'price', product: card_product, price_class: '' %}
4. Replace it with the code below.
{% if card_product.price != 0 %}
{% render 'price', product: card_product, price_class: '' %}
{% else %}
FREE
{% endif %}
Hi @Dvdv,
Just follow the instructions below
1. Go to Admin page > Online store > themes > Actions > Edit code
2. Open the main-product.liquid under the Section folder then add the code below.
3. Find the code below.
{%- render 'price', product: product, use_variant: true, show_badges: true, price_class: 'price--large' -%}
4. Replace it with the code below.
{% if product.price != 0 %}
{%- render 'price', product: product, use_variant: true, show_badges: true, price_class: 'price--large' -%}
{% else %}
FREE
{% endif %}
Thanks, now the price is indeed changed on the product page itself which is great and exactly what I ment. But is this also possible for the product collection grid? Because here is still says "$0" instead f "Free". Thanks in advance again! Appreciate it.
Hi @Dvdv,
Just follow the instructions below
1. Go to Admin page > Online store > themes > Actions > Edit code
2. Open the card-product.liquid under the Snippet folder.
3. Find the code below.
{% render 'price', product: card_product, price_class: '' %}
4. Replace it with the code below.
{% if product.price != 0 %}
{% render 'price', product: card_product, price_class: '' %}
{% else %}
FREE
{% endif %}
Weird. Looks like you have a different code in your collection. Are you able to share your website?
Yes, its Readtabs.com
This is an accepted solution.
Hi @Dvdv,
My bad. It was the liquid code. I just change the product to card_product
Just follow the instructions below
1. Go to Admin page > Online store > themes > Actions > Edit code
2. Open the card-product.liquid under the Snippet folder.
3. Find the code below.
{% render 'price', product: card_product, price_class: '' %}
4. Replace it with the code below.
{% if card_product.price != 0 %}
{% render 'price', product: card_product, price_class: '' %}
{% else %}
FREE
{% endif %}
Hi, I can't find this code:
{% render 'price', product: card_product, price_class: '' %}
I followed the steps Admin page > Online store > themes > Actions > Edit code
Then searched card-product.liquid and I can't seem to find it.
Thanks for the tip! I sent you a coffee!
Cheers!
Thanks so much for this code, I was also looking to replace $0.00 with Free, and used it in the featured product code. However, for some reason, the featured products that are not free are no longer showing the correct price. I have a product for £25.00 which now shows at £19.99. Any idea what could be causing that? I'm also using the sense theme.
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