How to hide add to cart and the price for all products in a collection?

Hil,

I am wokring on a project where i want to remove the add to cart botten and price for all products in one collection.

I found a guide to disable to add to cart botten on the whole store, but this is not what i want.

I hope anyone can share with me what code this will need :slightly_smiling_face:

Looking forward to hearing from you all!

Best Regrads
Casper

You will need to add condition code where it shows the price/cart button. It looks like this

{% assign shouldShow = true %}
{% for collection in product.collections %}
    {% if collection.id == 123 %}
        {% assign shouldShow = false %}
    {% endif %}
{% endfor %}

{% if shouldShow %}
    Code for cart button/price
{% endif %}

This require editing theme code. I can just show you the skeleton code, the full code really depends on your theme.

Hi,

I use debutify as my theme.
The reason i want to remove add the cart and the price is becuse i can a collection of every EV car. i want my visters to see all the cars compared at one site.
Therefore i do not want to sell the EV cars. And it should not look like a product page. The reason it need to be products is becuse i want to alow my visters to use filters.

Hope it makes sense.

Best Regards
Casper

Hi!

I use debutify theme, any idea what do code will be for this? and where i should put it in?

Best Regards
Casper