Re: How do I remove price from collections page?

How do I remove price from collections page?

BethLawton10
Tourist
11 0 4

Hello, 

 

How do I remove the price from the collections page? 

 

URL is https://staysharp.global/


Thanks in advance

 

Replies 38 (38)

Dbuglabpvtltd
Shopify Partner
705 75 117

@BethLawton10 
You can use css property display none to remove the price from collection page.
Or you can remove the price from liquid code.

banned

VectorCommerce
Shopify Partner
4 0 1

@BethLawton10 

 

Do you want to remove the price from all collections, or are there some collections you want the price removed from while keeping prices on some?

 

You can edit your theme code to change that collection template and remove the pricing.

 

I would do this by creating a new collection template, and removing the code that shows the pricing. This way you can have two collection templates to choose from: one without price showing, and the other with price showing.

 

Hope that helps!

Anthony Booth
Owner, Vector Commerce LLC
Get in touch: [email protected]
ARTess
Excursionist
19 0 2

@VectorCommerce

 

I had this same question and I did what you said, I created another template to remove the pricing from just a certain collection but what code do I put in the json of that collection to remove the price tags from all products? I would also like to remove the "sold out" tags from this same collection?

 

JazzzArt
Visitor
1 0 0

Hey Artess - I was wondering if you ever found a solution? I'm in the same predicament with creating my template for collections that doesn't show the price. 

AvadaCommerce
Shopify Partner
3879 839 983

Hi @BethLawton10 ,

 

Do you mean to remove this table price from the collection page?

 

Screen Shot 2022-03-16 at 11.06.15 AM.png

 

Please confirm again. Thanks you

banned
BethLawton10
Tourist
11 0 4

Hello @AvadaCommerce 

 

I mean the prices underneath the products on the homepage. Sorry, my original message wasn't clear. 

 

BethLawton10_0-1647418060230.png

 

Any ideas?

 

Thank you 

 

mt686
Shopify Partner
56 9 19

Hello @BethLawton10 !

So I went ahead and wrote a bit off CSS that will have your desired effect:

 

 

 

{% if template.name == "index" %} 
{%style%}
.grid-product__price {
    display: none;
}
{%endstyle%}
{% endif %}

 

 

 

(Do this on a copy theme!) Go into your store admin, then go to Online Store > Themes > Actions (on your live theme) >  Edit Code. Then search and find the file named 'theme.liquid'. Add that code to either the very top or bottom of that file, then hit save. That should work, let me know if it doesn't!

 

Another way to do it would be to use the app Easy Edits: https://apps.shopify.com/easy-edits
If you use the app, you can just click on the prices on the home page and set the display to none (it gives you a click and change editor for your store). You can always make your edits, and then delete the app and keep the edits, without paying.


(Disclaimer: I'm the founder/developer behind the app)


Hopefully, that helped out, let me know if it did or if I can answer anything else!

BethLawton10
Tourist
11 0 4

@mt686 the code didn't work unfortunately. I can't use the app as our legal team have to approve any apps we use, so I'd have to go through the due diligence process. 

 

Thank you anyway 🙂

mt686
Shopify Partner
56 9 19

Give this a try: 

 

{% style %}
.grid-product__price {
    display: none;
}
{% endstyle %}

 

Follow the same instructions to add it that I wrote before, and make sure to add it to a copy of your theme and look it over before publishing. Here's a screenshot after adding that code to your site:Screenshot (588).png


AvadaCommerce
Shopify Partner
3879 839 983

Hi @BethLawton10 ,

 

You can follow the instruction below:

1. Go to Online Store->Theme->Edit code
2. Asset->/theme.css->paste below code at the bottom of the file:

.grid-product__price {
    display: none !important;
}

If you feel like my answer is helpful, please mark it as a SOLUTION. Let me know if you have any further questions.

banned
vannivrystaat
New Member
5 0 0

Hi, how can I remove the product pricing from my collection page:

Just this collection page: 

https://vannivrystaat.co.za/collections/biltong we use DEBUT as theme.

Danajeannebell
Visitor
2 0 1

Hello, I just tried this and it didn't work for me. 

Danajeannebell
Visitor
2 0 1

I tried the below {% style %} .grid-product__price { display: none; } {% endstyle %} and it worked! Thanks!

Web_Sidd
Visitor
1 0 0

Hi!

where did you paste this content? Is it in theme.liquid or in the collection.json?

thanks

TomMc
Excursionist
29 3 5

Wouldn't the code need to be redone anytime there is an update to the theme? Thanks, Mt686. What a cool editing app, BTW. 

sarah_payne
Visitor
1 0 0

Hi I I'm looking to remove the prices in only one collection, as I'm not sure if I would be capable of inserting code, I have downloaded your app, but for some reason it's not working?  it says 

Application error

An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
heroku logs --tail

Spac-es
Shopify Partner
390 112 143

"Remove prices in collections tab"

 

I had the same concern, and managed to figure out how to do this in just a few steps. I want to share it here in case anyone else needs it!

 

(I'm using the default DAWN theme, although the idea should work in any Shopify theme)

 

1- Go to your store code and look for the following file called: price.liquid

 

1.PNG

 

2- Add the following code after the container: <div class="price__container">

 

 

  {% if collection.url contains '/collections' %}
    {%- assign show_price = false -%}
  {% else %}
    {%- assign show_price = true -%}
  {% endif %}
  
  {% if show_price %}

 

 

3- Remember to close the condition {% if show_price %} at the end of the code with {% endif %}. Line 93 in my case. The code will look something like this:

 

2.PNG

 

4- Save the file. In the collections tab you will no longer see the prices on the products.

 

I hope it has helped you!

Any donation is welcome! https://www.buymeacoffee.com/spacescoffee Thanks in advance!
ChampTableTech
Visitor
1 0 1

Thank you very much it worked! I tried all the other code but it didn't work for me, except for yours. The prices in my collections are hidden now thank you again!

hbenik
Excursionist
32 0 5

This looks like a great solution, but I don't seem to have <price.liquid> in my code? Using the impulse theme....

Spac-es
Shopify Partner
390 112 143

I have tried to download that template to find what the file is called in that specific topic, but since it is paid, I had to search the internet and there is no information about it. I would recommend asking an expert on the subject, or requesting support to find out what name they use for price.liquid

Any donation is welcome! https://www.buymeacoffee.com/spacescoffee Thanks in advance!
hbenik
Excursionist
32 0 5
Ok, thank you!
Amarann
Tourist
7 0 0

This worked for me as well, but I am trying to only remove the price for one of my collections, or one page. Is there a modification that will achieve that here, or do I have to go the template route?

Spac-es
Shopify Partner
390 112 143

Of course! To achieve that, you need to edit the following code:

{% if collection.url contains '/collections' %}

Replace '/collections' with the part of the URL that contains the page you want to apply the effect to, for example: /products/blue-item.

 

If you need the code to affect more than one URL, you can do something like this:

{% if collection.url contains '/products/blue-item' or collection.url contains '/products/red-item' %}

 

Any donation is welcome! https://www.buymeacoffee.com/spacescoffee Thanks in advance!
DDDigitalMS
Shopify Partner
24 0 13

Hi and happy new year! Thanks so much for these solutions. But I'm really hoping you can help a little further...

 

I need to hide the price on some but not all Collections too, but the above solution doesn't quite work for me due to the number of collections that I need to hide the price on.

 

Is it possible to set a hide price rule that kicks in based on a product tag, product type or even which product theme template it uses?

 

I'm using the Dawn theme and was previously given workable code to hide prices on any product tagged with 'business-listing'. This worked great on Dawn v 3.0.0, but I'm now upgrading to Dawn v 12.0.0 and the original code no longer works. 

 

I feel like your solution above would work perfectly if I could just change the collection.url contains '/collections' rule to something like product.tag contains 'business-listing' instead, but I tried that and it didn't work.

 

Would really appreciate your help.

DD Digital Marketing Services - UK
Shopify Website Build and Management | SEO | Marketing
Spac-es
Shopify Partner
390 112 143

Hey! Happy New Year!

 

I understand your issue. If you have a large number of products where you want to hide the price and only a few products where you want to display the price, you can negate the original condition and list only the URLs where you want to show the price (do the opposite 'show_price'):

 

  {% if collection.url contains '/products/blue-item' or collection.url contains '/products/red-item' %}
    {%- assign show_price = true-%}
  {% else %}
    {%- assign show_price = false-%}
  {% endif %}
  
  {% if show_price %}

 

The method you mention requires a good understanding of Shopify's liquid code, and I can't guide you on how to directly retrieve tags from products through code.

 

After exploring many pages and forums with similar topics, I've come up with a condition that takes product tags into account, in this case, 'business-listing.' I'm not sure if it will work, as I haven't tested it, but it's the best I could come up with. Hope it helps!"

{% if 'business-listing' | within: product.tags %}

 

Any donation is welcome! https://www.buymeacoffee.com/spacescoffee Thanks in advance!
DDDigitalMS
Shopify Partner
24 0 13

I used your first option with adding the few collections that needed to show prices, and it worked perfectly! Thank you so so much. It's so kind of you to help so many of us with this issue and provide customised tweaks. 

 

Hope you have a fabulous 2024 😊

DD Digital Marketing Services - UK
Shopify Website Build and Management | SEO | Marketing
PhoenixGaming
Visitor
2 0 1

Hi! I was hoping to get some help with this, i'm trying to remove pricing from collections on a duplicated theme code but keep getting this error (i'm no coder, just need a specific thing to work haha)

  • Liquid syntax error (line 28): 'if' tag was never closed

    This is the code, with the inputted section you suggested


    {% assign formatted_price = price | money %}

    {% comment %}
    Unless this store uses multiple currencies,
    if we apply a special style to cents,
    we will wrap them in a sup (superscript) element.
    {% endcomment %}

    {% if collection.url contains '/collections' %}
    {%- assign show_price = false -%}
    {% else %}
    {%- assign show_price = true -%}
    {% endif %}

    {% if show_price %}
    {% unless shop.money_format contains 'money' or shop.money_format contains '.' %}
    {% if settings.superscript_decimals %}
    {% if shop.money_format contains '{{amount}}' or shop.money_format contains '{{ amount }}' %}
    {% capture formatted_price %}{{ formatted_price | replace: '.','<sup>' }}</sup>{% endcapture %}
    {% elsif shop.money_format contains '{{amount_with_comma_separator}}' or shop.money_format contains '{{ amount_with_comma_separator }}' %}
    {% capture formatted_price %}{{ formatted_price | replace: ',','<sup>' }}</sup>{% endcapture %}
    {% endif %}
    {% endif %}
    {% endunless %}

    <small aria-hidden="true">{{ formatted_price }}</small>
    <span class="visually-hidden">{{ price | money }}</span>


    Thanks in advance! 

Spac-es
Shopify Partner
390 112 143

That error you're experiencing in your code is because you haven't properly closed the condition with {% endif %}. In my initial response in this thread, I explained step by step how to remove prices from collections. Specifically, in point number 3 in the image, you can see that we correctly closed that condition around line 93 in the document!

Any donation is welcome! https://www.buymeacoffee.com/spacescoffee Thanks in advance!
PhoenixGaming
Visitor
2 0 1

Thanks so much - really appreciate your time. It is all new to me.

Apex_Medical
Visitor
2 0 0

Hi @Spac-es, I was wondering if you could please assist me.

 

I am using the Yuva theme and I am trying to hide the pricing from a specific collections template but I am having great difficulty doing so.

 

Could you please drop me an email on [email protected] and confirm if you're able to assist?

Spac-es
Shopify Partner
390 112 143

Of course!

Any donation is welcome! https://www.buymeacoffee.com/spacescoffee Thanks in advance!
Val_Mad
Visitor
1 0 0

Hi, I'd like to try this out for my BROADCAST theme but it doesn't have "price.liquid". I'm no developer but the closest I can see is "product-price.liquid" but I can't find reference to any "container" code to apply your changes. Do you have any suggestions for something else I could try? I just have one collection that I'm trying to omit prices displaying on. 

Bibs
Visitor
1 0 0

Did you have any luck? Struggling with the same issue currently

Apex_Medical
Visitor
2 0 0
I was able to get help form a user that goes by the username: Spac-es
julefrms
Shopify Partner
11 0 1

I have the same issue in my impact theme. I just want to remove the prices from specific collections but there's no "product.liquid" code.. 😞

Russell_Turner
Visitor
2 0 1

Needed the same resolution. Thank you – this worked a treat.

Russell

bridalstore
Visitor
2 0 1

This looks like the most thorough response! Unfortunately I'm using Pipeline theme and it has 'product-price.liquid' file, not 'price.liquid'

 

Would love your support to understand where to add this code on my theme in 'product-price.liquid' file (looks very different than your screenshot). I think other people below had similar questions. thank you!!

pcipriani
Visitor
3 0 0

We are prohibited to display pricing on some of our products. I was able to modify the price.liquid file so that an item with no price (0.00) would state "Contact us for pricing" instead of showing $0.00 as the price. Here's the code snippet...

 

{% comment %}
Custom code to suppress price if zero
{% endcomment %}
{% if price < 1 %}
<span class="price-item price-item-regular">Contact us for pricing</span>
{% else %}
<span class="price-item price-item-regular">
{{ money_price }}
{% if settings.price_tax_suffix and cart.taxes_included %}
<span class="sup">{{ settings.price_tax_suffix }}</span>
{% endif %}
</span>
{% endif -%}

 

And of course you must position it correctly, replacing the code that displays the price.