Remove price and place "request a quotation" instead

Highlighted
New Member
2 0 0

Hello everyone, i am trying to remove the price for certain products and place a "request a quotation" text instead.

In sections i created a copy of the product template and i deleted/commented the button while adding this code:

     <a href="mailto:{{ shop.email }}"><button class="btn">Auf Anfrage</button></a>

Product page now is ok.

The problem remains in the collection products grid: i added this code before the </div> of <div class="product-item--price"> (theme is "supply"):

{% for pro_tag in product.tags %}
       {% if pro_tag  contains 'hide_price' %}     
                   <small>request an offer</small>
        {% else %}                     
                    <div>
                           {% include 'price' with product.price %}
                    </div>       
        {% endif %}
{% endfor %}

In my head it should check for the tag and, if present, place the text, if not, place the price. And actually the "request an offer" appears, so it seems to see the tag,. The problem is the price appears too, still. And on other products the price appears 2 or even 3 times in column. 

I don't know much about coding, how can i just hide the price when the tag "hide_price" is present or when my custom product template is used?

Thank you

in case you need it the website is https://der-huber-ag-online-shop.myshopify.com/ but we are not yet online so it is password protected

0 Likes