FROM CACHE - en_header

Customers discount codes to allowed - Liquid

Solved
Wabema
New Member
8 0 0

good day,

Is there a Liquid query in which I can output on the account page for which voucher codes the customer is authorized to use?

Thanks in advance 🙂

Kind regards
Markus

Accepted Solution (1)

Accepted Solutions
LitExtension
Shopify Partner
4834 990 1023

This is an accepted solution.

Hi @Wabema ,

This is not possible, you can just use app to add it.
Or you will manually add discount codes tags for each customer, then show it when they login. You can follow the instructions:
- Step 1: Add tags for customer. https://i.imgur.com/50rt2Vs.png . It will have a prefix to distinguish other tags, ex: discount:
- Step 2: Add code to display when customer login in account page. Code:

{% for tag in customer.tags %}
  {% if tag contains 'discount:' %}
	Discount codes: {{ tag | remove_first: 'discount:' | strip  }}
  {% endif %}
{% endfor %}

Hope it helps!

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify

View solution in original post

Reply 1 (1)
LitExtension
Shopify Partner
4834 990 1023

This is an accepted solution.

Hi @Wabema ,

This is not possible, you can just use app to add it.
Or you will manually add discount codes tags for each customer, then show it when they login. You can follow the instructions:
- Step 1: Add tags for customer. https://i.imgur.com/50rt2Vs.png . It will have a prefix to distinguish other tags, ex: discount:
- Step 2: Add code to display when customer login in account page. Code:

{% for tag in customer.tags %}
  {% if tag contains 'discount:' %}
	Discount codes: {{ tag | remove_first: 'discount:' | strip  }}
  {% endif %}
{% endfor %}

Hope it helps!

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify