Change the price of a product by the customer's tag

nassong
Visitor
1 0 0

Hi everyone, I would like you to help me with my code please.

I have created a code that allows the customer to get a 20% and 10% discount on all the products in my store if he has the tag "GV20" or "GV10"
Now I would like to bring a discount that changes according to the customer's tag only on a collection of my products in addition to the tags "GV20" and "GV10".

 

          {% if customer.tags contains "GV20" %}
              {{ product.price | times: 0.8334 | money }}
          {% else %}
              {% if customer.tags contains "GV10" %}
                   {{ product.price | times: 0.9167 | money }}
              {% else %}
	               {{ money_price }}	
          	  {% endif %}
          {% endif %}

 

Replies 0 (0)