Customers based on Tag see Compare at Price

Cappa1
Visitor
1 0 0

Hello, 

In my store, I want to reflect different prices based on tagged customers. I only have two price points, we can use the regular price and compare at price for these levels. If I can figure out how to show the compare at price to non-tagged customers and show the regular price to tagged customers or vice-versa, my issue would be fixed. Customers also need to check out based on their price level. I am aware that there are apps that would do show different prices to different customers but is it possible to do it via coding?

 

I tried to edit the product-template.liquid by inserting this code but nothing has changed:

<div class="product-single__prices{% if cart.taxes_included or shop.shipping_policy.body != blank %} product-single__prices--policy-enabled{% endif %}">
 {% if customer.tags contains "vip" %}
  <span id="PriceA11y" class="visually-hidden">{{ 'products.product.regular_price' | t }}
  </span> <span id="ProductPrice" class="product-single__price" itemprop="price" content="{{ product.price | divided_by: 100.00 }}"> 
  {{ product.price | money }}
  </span>
 {% else %}
  <span id="PriceA11y" class="visually-hidden">{{ 'products.product.regular_price' | t }}
  </span> <span id="ProductPrice" class="product-single__price" itemprop="price" content="{{ product.compare_at_price_max | divided_by: 100.00 }}"> 
  {{ product.compare_at_price_max | money }} 
  </span>
 {% endif %}

I also tried this method which didn't change anything:

<div class="product-single__prices{% if cart.taxes_included or shop.shipping_policy.body != blank %} product-single__prices--policy-enabled{% endif %}">
            
 <span id="PriceA11y" class="visually-hidden">{{ 'products.product.regular_price' | t }}</span>
 <span id="ProductPrice" class="product-single__price" itemprop="price" content="{{ product.price | divided_by: 100.00 }}">
 {% if customer.tags contains "wholesale" %}
    {{ product.compare_at_price_max | money }}
 {% else %}
    {{ product.price | money }}
 {% endif %}
 </span>

 

Thank you for your help.

 

Reply 1 (1)

gr_trading
Shopify Partner
1689 141 175

Hi @Cappa1 

 

You can create customer segment from admin and create automatic discount for them.

 

Rest theme will handle.

 

Hope it will help...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee