Remove $0.00 label both on product and collection pages

Solved
LissyNEWZEALAND
Tourist
23 0 2

Hi there, I've tried everything so far but I am using the Brooklyn theme and I just need a code that basically will remove any labels that say $0.00 on my product or collection pages. I.e. some of our products are custom made so they are set to $0.00 but I don't want that showing on the collection OR product page..

Thanks! 

0 Likes
jayanetty
Pathfinder
115 12 34

Hi @LissyNEWZEALAND,
Do the products some prices other than $0.00? 
If not you can remove the whole container that says {{variable.price}}

I can help if you can share your help URL.

0 Likes
LissyNEWZEALAND
Tourist
23 0 2

Hi! thanks for your quick reply.

Most products are priced above $100 so I need the prices visible for those.

I just need products where the price is $0.00 to be hidden - not the whole product, just the price label so it is blank instead of $0

 

For example - here https://4npovvp1cpia7c4l-4420272163.shopifypreview.com

 

If you click "All products" then go down to "Wardrobes" or "Kitchens" you can see each says $0.00. I just want that to be blank. 

 

Thank you !

0 Likes
dmwwebartisan
Shopify Partner
4358 977 1244

This is an accepted solution.

You need to edit following file in your Brooklyn theme.
snippets/product-grid-item.liquid

There you must do 2 things:
First if you hide price then ( -- ) dash will be there so first will remove dash.

1) On Line no 84:

<span class="long-dash">—</span>

Replace with following code:

{% if product.price > 0 %}
  <span class="long-dash">—</span>
 {% endif %}

2) Hide price with 0 value
on line 98:

 {{ product.price | money_without_trailing_zeros }}

Replace with following code:

{% if product.price > 0 %}
   {{ product.price | money_without_trailing_zeros }}
  {% endif %}

Hope this helps!

If helpful then please Like and Accept Solution.
Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Advanced Shopify Page Builder to customize your pages - check here PageFly App
LissyNEWZEALAND
Tourist
23 0 2

It worked perfectly! thank you so much! do you also know how to do the same on the individual product pages? it has worked on the collection page but still shows $0.00 when clicking into a product.

Thanks!

0 Likes
dmwwebartisan
Shopify Partner
4358 977 1244

This is an accepted solution.

Hey LissyNEWZEALAND,

 

Always welcome. I am happy that solution worked for you and thanks for like and accepted as a solution.

 

As for the product page:

snippets/product-price.liquid on line no 22

{{ variant.price | money }}

replace with :

{%- if variant.price > 0 -%}
    {{ variant.price | money }}
 {%- endif -%}

Hope this works!

 

Thanks again!

If helpful then please Like and Accept Solution.
Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Advanced Shopify Page Builder to customize your pages - check here PageFly App
LissyNEWZEALAND
Tourist
23 0 2

excellent!! thank yoou!

jtownes89
New Member
1 0 0

I think this solution Will accomplish what I am trying to do. I wanted to confirm and maybe even get your advice on how to implement this. 

 

I want to display a gallery of photos. These will not be products so I do not want them to have price label and I do not want to add to cart option for them. I simply want customers to be able to request a private event from me via a form (i.e. number of attendees, desired date, etc) and I want the customer to be able to select one of the photos as their option for their event. 

 

This can be accomplished one fo two ways:

1) searchable and taggable photo gallery with numbers or titles for each photo, customer needs to write down to remember the photo name or number and add it to the event request form

2) more ideally, during filling out the event request form a button saying "select theme" will show directing them to the gallery of "products" that are not products.

 

Hopefully that was clear. Any help is appreciated. 

0 Likes