Shopify themes, liquid, logos, and UX
I need to be able to hide the price on the collection pages for specific products. I have edited the code based on other recommendations in the forum, but it has hid all product prices not the specific ones.
There are two ways that the products are separated and can be identified:
Products that must have their price HIDDEN on the collections page are using the "in-store-only" page template and
are NOT in the "online" collection (linked below).
https://honeyfawn.com.au/collections/online
I have sorted the price showing on the product page, I just need the collection pages sorted!!
Please help!!
Solved! Go to the solution
This is an accepted solution.
May I suggest to update code these steps:
1. Go to each product that you would like to hide price after that add "in-store-only" tag
2. Go to Store Online-> theme -> edit code
3. Snippets/card-product.liquid
4. Add code below to top file
{% assign hidePrice = false %}
{% if card_product.tags contains 'in-store-only' %}
{% assign hidePrice = true %}
{% endif %}
5. Find
{% render 'price', product: card_product, price_class: '' %}
replace with code below
{% unless hidePrice %}
{% render 'price', product: card_product, price_class: '' %}
{% endunless %}
Maybe I suggest you add "in-store-only" tag to products that you want to hide after that use liquid to check to hide price.
This is the code I'm currently using
<style>
{% if collection.handle != 'online' %}
.card__information .price {
display: none !important;
}
{% endif %}
#shopify-section-template--15790987542750__1646917325a197e0ca .card__information .price {
display: block !important;
}
</style>
This is an accepted solution.
May I suggest to update code these steps:
1. Go to each product that you would like to hide price after that add "in-store-only" tag
2. Go to Store Online-> theme -> edit code
3. Snippets/card-product.liquid
4. Add code below to top file
{% assign hidePrice = false %}
{% if card_product.tags contains 'in-store-only' %}
{% assign hidePrice = true %}
{% endif %}
5. Find
{% render 'price', product: card_product, price_class: '' %}
replace with code below
{% unless hidePrice %}
{% render 'price', product: card_product, price_class: '' %}
{% endunless %}
That worked - thank you so much!!!
Wondering if you might be able to help with this: https://community.shopify.com/c/shopify-design/fashionopolism-hide-price-on-collection-page/m-p/2564...
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025