Hello,
Is there a liquid variable that can show how many times a customer has ordered from the store?
I would like to choose a different package insert during my fulfilment process based on the number of times a person has ordered from us.
If this is their first order they get insert #1
If this is order 2 or 3 they get insert #2
etc…
The insert will be selected manually I would just like a way to add the information to the packing slip generated by shopify.
Thank you!!!
Hi @jgessentials ,
You can get the customer orders count. You can read the documentation here.
Please refer to code below
{% if customer %}
{% if customer.orders_count == 1 %}
first order
{% else %}
More than 1 orders
{% endif %}
{% endif %}
1 Like
Thank you - I tried the code and regardless of the number of orders a person placed in the past it always shows “first order”
Would you mind double checking my code:
{% if customer %}
{% if customer.orders_count == 1 %}
★ First Order
{% else %}
⤐ Repeat Order
{% endif %}
{% endif %}
@jgessentials ,
I tried it in my store and shows the right thing for me
Thank you.
I have a test with a first order and a person who placed 10 orders.
They all show as repeat order on my end.
I am pretty sure the code is good. Is there something else I should be looking at?