hide prices of products in a collection?

Solved
Highlighted
New Member
5 0 0

Hello

how can i hide prices of some products which are listed in a specific collection? like

coming soon collection without prices for products.

 

Im using the supply theme, if that matters

 

Thank you

0 Likes
Highlighted
Shopify Partner
918 195 357

@moe1044 

 

No, It's not matter which theme you are using. You can hide products price in any theme and there are several way to do it.

I think product tags is the best option because you are taking about the coming soon product so I think you have also hide price as well as Add To Cart button on product page otherwise user can still able to see price and Add To Cart on product page.

For this solution you have to add special tag in product like "coming-soon" then you can apply the condition on product price, if product has 'coming-soon' tag then price not display for that. it require some tweaks with code and Liquid files, and if this is something you would not be comfortable with, I would advise you to reach out to one of Shopify Experts, or you can contact me by mail. As always, when making code changes to your theme, please remember to create a backup, in case you need to revert back to previous versions of the theme.

 

Thank you,

Tejas

Shopify Expert | Skype: tejas.nadpara
- Like and Mark as an Accepted Solution if reply helpful
- Feel free to contact me on support@hexaecommerce.com regarding any help
1 Like
Highlighted
New Member
5 0 0

i was able to delete the prices on the product page.

 

Now im trying to delete the prices on the collection page.

 

I tried editing code at the product-grid-item-liquid for this problem.

 

Im guessing have to edit line 9 and 11 for the collection?

 

011dbabasdv.png

0 Likes
Highlighted
New Member
5 0 0

Im trying to hide the prices on collection(sectional) page.

 

I made alternate product template to hide the prices for the product page.

 

But i cant figure out how to make alternate collections page to hide the prices.

 

I dont want the prices listed under the picture because pricing will vary depending on options chosen.

 

i believe i need to edit product-grid-item.liquid

Screenshot (2).png

So I made alternate product-grid-item.liquid.

 

But i cant figure out the code to tell what collection to block the prices.

 

0 Likes
Highlighted
Shopify Partner
1281 169 403

This is an accepted solution.

You need to find the piece of the code in your collection.liquid file where it shows the price and use an unless statement around it. So something like:

 

{% unless collection.handle == "your-collection-handle" %}
<div class="product-price">
{{ product.price }}
</div>
{% endunless %}

This way it will show the price UNLESS it's the specified collection.

If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
3 Likes
Highlighted
Excursionist
12 0 1

@NinthonyThank you for your amazing answer! However, I'm suck pretty hard at coding, where do I have to add the unless statement in this case/what do I exactly have to do?

unless preis.png

 

Thank you very much! :)

 

- Nicolas

1 Like
Highlighted
Shopify Partner
1281 169 403

Pretty sure you could do it around the include:

 

{% unless collection.handle == 'your-collection-handle' %}
  {% include 'product-price' %}
{% endunless %}
If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
3 Likes
Highlighted
Excursionist
12 0 1

I really appreciate your answer, but I'm afraid I suck too hard at coding lol ._.

 

Do I just put this line

{% unless collection.handle == 'your-collection-handle' %}

 in front of the 'include product price' line & after that this line

{% endunless %}

or is there more to it?

Sorry for the inconveniences my man

0 Likes
Highlighted
Shopify Partner
1281 169 403

Yeah, just like I posted, it should look exactly like this. Lets say for example your collection was called "T Shirts" -- right now it looks like this:

 

{% include 'product-price' %}

Just replace that with:

{% unless collection.handle == "t-shirts" %}
  {% include 'product-price' %}
{% endunless %}

 

If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
2 Likes
Highlighted
Excursionist
12 0 1

Preis raus 2.png

Well, my Category is called ,,Wie funktioniert's?" & I did everything you told me to, but for some reason the price still gets displayed :/

Any idea?

0 Likes