All things Shopify and commerce
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
Solved! Go to the solution
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.
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
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
Hi @Mad_Modeler ,
No worries, just had a quick look for you.
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
@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 !
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
@OliUK can you help me to remove product price from the collection page?. I'm using the motion theme.
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.
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:
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
It would be of benefit to know how to do all three !
I want to remove product price from all products.
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.
you're welcome! wishing you a great day.
Hi @diego_ezfy
I have a similar situation. I'm trying to remove all the prices in the collections only. I still want to be able to see them in the product side. I was trying to follow along this thread but I'm missing the file your relating to. Can you help?
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024