Hi there, I want to hide prices under products only in the collection view and in the featured collection that i have put in frontpage. Anybody know how?
I've already tried to do this editing in html/css of debut the "collection-list.liquid", "collection.liquid" and "collection-template.liquid" into sections folder, but i didn't found a solution.
Thanks in advice for your help.
Luca.
Im also looking for an answer for this, so thanks in advance to anyone that can help us out here.
Anders
Hi guys,
there are two approaches here:
1. Use CSS to make prices invisible. The price will still be in the HTML file, but users will not see it (unless they look into page source:). Easily done by adding the following code at the bottom of your theme.scss.liquid
.grid-view-item .product-price__price {
display: none;
}
2. Modify the product-price.liquid Snippet to stop it outputting price. You can add conditions there, like "do not show price if product belongs to collection, or has a tag". If you totally do not want prices on collection listings, you can simply wrap entire snippet into {% comment %} {%endcomment %} tags.
Hey Luca and Tim,
This is Oswald, a Guru here at Shopify!
Another easy way to hide the price from your collection page(s) and the featured collection would be to go to HTML/CSS editor of the theme (Online Store > Themes, click the "..." button near the top right corner, click "Edit HTML/CSS". Once in the HTML editor under the "Snippets" folder, you will find a file called "product-card-grid.liquid", and all you'll need to do is wrap the price line (line - 12) with {% comment %} ...... {%endcomment %}.
This will hide the product price from both the Featured collection on the frontpage and the collection pages.
Hope the information above helps! If you have any other questions, feel free to reach out to the Guru team. :)
Cheers!
Oswald | Shopify Guru
Thanks both Tim and Oswald, i resolved using the Oswald suggestion, but also Tim's ways works. Thanks again.
L
Hi - This works great, thanks. But what if I want to hide the prices for items in just one of my collections? I need to create a new template for the collection and then select that template from the dropdown on the collection page, correct? I'm not sure of the coding on the new template page. thanks
User | Count |
---|---|
396 | |
204 | |
129 | |
46 | |
42 |