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

Invoice show a message for a certain sales channel

Invoice show a message for a certain sales channel

skuntz24
Tourist
9 1 5

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".

Replies 2 (2)

marcuswebexp
Shopify Partner
53 5 8

Hi @skuntz24,

 

Are you talking about the notification from the draft order invoice in Shopify?

 

 

 

Myles Marcus | Web & Automation Specialist @ Marcus Web Experts LLC
Email: myles@marcuswebexperts.com
Phone: 858-208-3379
Your satisfaction is our top priority. If you don’t feel like you’re getting value, you don’t pay. It’s that simple.

skuntz24
Tourist
9 1 5

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.