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

Order Printer Template - How To Get Store's Address

Solved

Order Printer Template - How To Get Store's Address

PunkOuter
Excursionist
36 1 25

Hello. I'm using the Shopify app, Order Printer, and am wanting to print the customer information and store information directly onto a #10 envelope. I'm struggling with even getting the store address because shop.address no longer exists as a callback. It has been depricated, but I'm unable to find out what I should be using now to get the store's shipping address.

If anyone has an Order Printer template already created that puts the store's name and address in the upper left of the envelope, and the customer information in the center, I'd greatly appreciate it. All of the stuff I'm finding is older code back before Shopify changed things around to no longer work.

Cheers!

Accepted Solution (1)

tim
Shopify Partner
4812 598 1733

This is an accepted solution.

This code (taken from the default template for, say, Invoice) works pretty well:

    {{ shop.address | format_address }}

Yes, if you use simply:

    {{ shop.address }}

this will result in "AddressDrop" shown.

 

See https://shopify.dev/docs/api/liquid/filters/format_address 

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com

View solution in original post

Replies 3 (3)

tim
Shopify Partner
4812 598 1733

This is an accepted solution.

This code (taken from the default template for, say, Invoice) works pretty well:

    {{ shop.address | format_address }}

Yes, if you use simply:

    {{ shop.address }}

this will result in "AddressDrop" shown.

 

See https://shopify.dev/docs/api/liquid/filters/format_address 

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
PunkOuter
Excursionist
36 1 25

Wow, so I swear I tried this and it didn't work, but it's working just fine now. So, thank you for patiently helping and not thinking I'm dumb (which I totally am many times, so I accept that label, hah).

Cheers!

PunkOuter
Excursionist
36 1 25

To add to this, these old methods of calling upon that information appear to no longer work, so I'm just hoping to get the updated function calls.

shop.address.address1
shop.address.city

And so on. 🙂