Remove product price from collection screen

Solved
Highlighted
Excursionist
54 0 10

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

0 Likes
Highlighted
Shopify Partner
140 2 22

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

 

 

1 Like
Highlighted
Shopify Staff
Shopify Staff
438 47 98

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

1 Like
Highlighted
Excursionist
54 0 10

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

0 Likes
Highlighted
Excursionist
54 0 10

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

0 Likes
Highlighted
Excursionist
54 0 10

@DirkHaving solution to all three would be a benefit

0 Likes
Highlighted
Excursionist
54 0 10

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

0 Likes
Highlighted
Shopify Partner
140 2 22

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

 

 

 

0 Likes
Highlighted
Excursionist
54 0 10

@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 !

0 Likes
Highlighted
Shopify Partner
140 2 22

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

 

 

0 Likes