Personalized checkout and custom promotions with Shopify Scripts
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I'm trying to edit my invoice so that it prints a message only for Amazon order. Those orders have a sales channel of "Amazon" and a shipping method which contains "Amazon" and a tag saying "Amazon". I'm trying something like
if order dot channel == 'Amazon'
print my message...
but obviously order.channel does not exist in Liquid. I tried to get order dot shipping_method, but when I print it out, it shows something like "ShippingLineDrop", not "Amazon FreeEconomy" like I would expect from looking at the order grid. As for the tag, I don't know how to loop through all the tags and find one which says "xxx".
Hi @skuntz24,
Are you talking about the notification from the draft order invoice in Shopify?
I did figure it out...the code is like so:
{% if order.tags contains "Amazon" %}
I'm not sure why there is no way to access the sales channel of the order though. It shows up on the order grid, I'd think there would be some sort of object like order.channel, but there doesn't seem to be.