Solved

Remove product price from collection screen

Mad_Modeler
Pathfinder
183 2 33

I have created a product with variants, and created a collection for it.

 

On the Collection screen it's showing the price, I just want an image linking to the products page.

 

See  image

ammomig.png

Accepted Solution (1)

diego_ezfy
Shopify Partner
2958 568 890

This is an accepted solution.

 

Hey @Mad_Modeler 

This will quickly fix your problem:

1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find Asset > theme.scss.liquid and paste this at the bottom of the file:

body.template-collection .price{
    display: none !important;
}


Please let me know whether it works.

 

◦ Follow my blog & youtube for coding tutorials.
◦ Replace apps with copy/paste code snippets and save money.

View solution in original post

Replies 16 (16)

OliUK
Shopify Partner
234 2 48

Hi @Mad_Modeler ,

The name of the collection file in your theme may be different, but for our test store it's in your themes directory => Sections => collection-template.liquid.

You'll then be using the find function (cmd+f) to search for a line of code containing: 

 

 

product.price

 

 

If there's only one line referencing this, then there's a good chance that's the line of code to delete.

If not, I would use Google Chrome Inspector on the front end of your website to find the name of the HTML element's class. Then search your theme's collection file again using that class name to narrow down the options, on which 'product.price' containing line to delete

Highly recommend copying and pasting any theme file somewhere safe before you start modifying it.

 

Good luck,

Oli

 

——————————

Founder @ www.preproduct.io

Test and make sales for future products

 

 

Mad_Modeler
Pathfinder
183 2 33

I can't find that in the template suggested or any others

It's also not traceable through "Inspect Element"

 

https://p5ah8lqzi1l6ax4t-7268892739.shopifypreview.com/collections/ammo-mig

Mad_Modeler
Pathfinder
183 2 33

@OliUKI can't find that line in any of the template  HTML files

OliUK
Shopify Partner
234 2 48

Hi @Mad_Modeler ,

No worries, just had a quick look for you.

Screenshot 2020-08-13 at 08.57.52.png

So, it looks like the line of code will contain: 

 

 

<dl class="price price--on-sale"

 

 

 

If you search for that line of code in one of your collection files, that's most likely the one to remove

Couldn't stress enough to make a copy before making the change though.

 

Cheers,

Oli

 

——————————

Founder @ www.preproduct.io

Test and make sales for future products

 

 

 

Mad_Modeler
Pathfinder
183 2 33

@OliUKI'm not sure even thinking of removing that line is a good idea, it seems to be a generic for all product prices in all collections !

OliUK
Shopify Partner
234 2 48

Hi @Mad_Modeler ,

 

Your exactly right, that would remove the price for all collections.

If you put the price code between one of these two statements, it shouldn't apply to the ammo section. If that doesn't work, you may have to post your code file.

<% if collection.handle != 'ammo-mig' %>



<% endif %>

or 

<% if collection.id != 173922713654 %> 



<% endif %>

 

Cheers,

 

Oli

 

——————————

Founder @ www.preproduct.io

Test and make sales for future products

 

 

zeshanhaidar
Excursionist
12 0 6

@OliUK can you help me to remove product price from the collection page?. I'm using the motion theme.

OliUK
Shopify Partner
234 2 48

Hi @zeshanhaidar ,

It sounds like diego_ezfy has a much neater solution than the one I was previously proposing, so I would try that first.
If it doesn't work, you might have to specify the class that your theme uses. 

Cheers,

Oli

 

——————————

Founder @ www.preproduct.io

The smarter way to launch products.

 

 

Dirk
Shopify Staff
2217 247 506

Hey, @Mad_Modeler 

Great question. There are a couple of ways you could approach this, but the coding required to make this change would depend on what your end goal is. Do you want to hide the product price for: 

  1. All product prices across all your collection pages
  2. All product prices in a specific collection page
  3. A specific product in a specific collection page

Let me know and we can go from there. If there is anything else I can help you with, please let me know.

 

 

Dirk | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Mad_Modeler
Pathfinder
183 2 33

It would be of benefit to know how to do all three !

Mad_Modeler
Pathfinder
183 2 33

@DirkHaving solution to all three would be a benefit

vinvir
Visitor
1 0 0

I want to remove product price from all products.

 

diego_ezfy
Shopify Partner
2958 568 890

This is an accepted solution.

 

Hey @Mad_Modeler 

This will quickly fix your problem:

1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find Asset > theme.scss.liquid and paste this at the bottom of the file:

body.template-collection .price{
    display: none !important;
}


Please let me know whether it works.

 

◦ Follow my blog & youtube for coding tutorials.
◦ Replace apps with copy/paste code snippets and save money.
Mad_Modeler
Pathfinder
183 2 33

@diego_ezfy  Thanks a bundle

 

That works beautifully

diego_ezfy
Shopify Partner
2958 568 890

@Mad_Modeler

you're welcome! wishing you a great day. 

◦ Follow my blog & youtube for coding tutorials.
◦ Replace apps with copy/paste code snippets and save money.
madcurls
Tourist
8 0 1

Hi  @diego_ezfy