Solved

Flagging new/repeat customers on packing slip

brokenalice
Tourist
4 0 3

I need some html help for my packing slips. I'd like to have some sort of mark on my parking slips that would indicate EITHER a new customer or a repeat customer. Doesn't have to be both. For example, my Etsy packing slips have a star next to the name of a repeat customer. But the mark can be anywhere on the page. I would imagine it would be something like "if customer order count is >1" they would get flagged as a repeat customer. I just don't know how to code that. 

 

Thanks for any help. 

Accepted Solution (1)

PremierStores
Shopify Partner
285 28 52

This is an accepted solution.

Hi, @brokenalice

You need to edit your product page liquid, get customers_orders count, you can find more information here:
https://shopify.dev/docs/liquid/reference/objects/customer#customer-orders_count

Then you can add a value as product property, like flagged: true 
You can find more information about product properties here:
https://community.shopify.com/c/Shopify-Design/Product-pages-Get-customization-information-for-produ...

If you need further assistance feel free to send us an email.

Let's make the best store!
Contact us at: thepremierstores@gmail.com

View solution in original post

Replies 15 (15)

PremierStores
Shopify Partner
285 28 52

This is an accepted solution.

Hi, @brokenalice

You need to edit your product page liquid, get customers_orders count, you can find more information here:
https://shopify.dev/docs/liquid/reference/objects/customer#customer-orders_count

Then you can add a value as product property, like flagged: true 
You can find more information about product properties here:
https://community.shopify.com/c/Shopify-Design/Product-pages-Get-customization-information-for-produ...

If you need further assistance feel free to send us an email.

Let's make the best store!
Contact us at: thepremierstores@gmail.com
brokenalice
Tourist
4 0 3

Thank you for the response. The product page did not need to be updated, just the packing slip template. Thank you for pointing me to the document with the customers_orders count information. That's exactly what I needed. I was able to figure it out from there. 

MajoMansour2
Visitor
1 0 0

I wanted to ask if you found a solution for this. I am also trying to flag or identify at the warehouse new from repeat orders and i looked everywhere i cant figure out how this can be done. we use tradegecko and ship station and they both dont support that as well

PremierStores
Shopify Partner
285 28 52

Hi, @MajoMansour2

We provide the instructions to do it, this requires editing the theme, we can help you with this task.

Let's make the best store!
Contact us at: thepremierstores@gmail.com
roos
Visitor
1 0 0

Hi there @brokenalice , I am trying to do this exact thing - indicate somehow on the packing slip that this is an order placed by a new customer or that this is a repeat customer.

I followed the links but I'm still unable to make customer.orders_count appear on the packing slip. How did you make it happen? Can you post your code?

gimmefood
Excursionist
12 0 36

customer.orders_count is not supported in Packing Slip variables.

 

For a complete list of supported liquid references inside the Packing Slip template please see this link

vismail
Tourist
4 0 2

Could you please let me know how did you do it?

I tried adding 

{% if customer.orders_count > 1 %}
{% continue %}

{% else %}
***
{% endif %}

 but didn't work.

 

Thank you in advance.

George_C
Trailblazer
155 1 145

I think you are on the right track, @vismail . But I think the code might need to specify which customer we are referring to. Not sure how to do that. 

Monster, creature & cryptozoology patches, buttons & stickers.
plantscactus
Visitor
1 0 1

One of the Shopify helpers mentioned that {{ customer.orders_count }} is not supported on packing slip, but I just added it onto mine and it works!

 

I added 

 

{% if customer.orders_count != 1 %}
WELCOME FTB
{% endif %}

 

Super easy

George_C
Trailblazer
155 1 145

Looks like you can only use the != 1 logical operator ("is not 1") for this to work.

 

I tried >0, >=1 and others with no luck. 

 

Thanks @plantscactus !

Monster, creature & cryptozoology patches, buttons & stickers.
George_C
Trailblazer
155 1 145

Unfortunately, I did not properly test this. It's just adding the conditional text to all orders. 

Monster, creature & cryptozoology patches, buttons & stickers.
George_C
Trailblazer
155 1 145

@brokenalice can you please share how you solved this? 

Monster, creature & cryptozoology patches, buttons & stickers.

Tonynikas
Visitor
1 0 0

I've been looking for a while for my online butcher shop to add something to the packing slip none of these solutions worked for me. (mind you I'm a meat guy, not a computer guy) However, I found a free app called "Auto Tags Orders & Customers" which allows you to add a tag to any customer with an IFTTT format. I just uploaded it and it looks like it works. I hope this helps out!

franzzeq
Tourist
9 1 5

Hi!

 

You must use this liquid tag to get the information that you need

{{ order.customer.orders_count }}

 

If you're here after hours of googling, thanks me at Instagram @franzeq kjsdfjk

George_C
Trailblazer
155 1 145

This does seem to be working for me in the packing slips template, thanks! Using this code:

 

{% if order.customer.orders_count != 1 %}
***repeat customer indication here***
{% endif %}

I entered it right after the Order Number code, line 10: 

Order {{ order.name }}

 

Monster, creature & cryptozoology patches, buttons & stickers.