Shopify themes, liquid, logos, and UX
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.
Solved! Go to the solution
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.
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.
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.
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
Hi, @MajoMansour2:
We provide the instructions to do it, this requires editing the theme, we can help you with this task.
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?
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
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.
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.
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
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 !
Unfortunately, I did not properly test this. It's just adding the conditional text to all orders.
@brokenalice can you please share how you solved this?
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!
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
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 }}
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024