2

In email templates Magento makes the shipping address & Billing address as one line,

How to make the shipping address data to be separated like

  • Shippping City
  • Shipping Region
  • Shipping Country
  • Billing City
  • Billing Region

Also this for Billing Address data.

Can you help us?

2
  • magento seperates the address under Bill To and Ship To heading to seperate the billing and shipping address. How do you find it in a same line? Could you please add the screenshot of it? Commented Dec 26, 2017 at 5:02
  • How to display shipping city ,shipping region, shipping Street also for billing i only find a function for Telephone, shippingaddress->GetTelephone(); or the function getshippingaddress() Commented Dec 26, 2017 at 6:55

1 Answer 1

1

To seperate the shipping Data.

Goto System > Configuration > Customers > Customer Configuration > Address Templates.

Change Text and Text One line to format it as per the need.

To add variables manually you can use magento variables. For example, to get shipping region {{var order.getShippingAddress().getRegion()}}

Check below link to see the list of variables can be used in the email template. https://www.parenttechnology.com/blog/magento-commerce/237-email-variables-for-magento.html

5
  • I find this text : {{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}} {{depend company}}{{var company}}{{/depend}} {{if street1}}{{var street1}} {{/if}} {{depend street2}}{{var street2}}{{/depend}} {{depend street3}}{{var street3}}{{/depend}} {{depend street4}}{{var street4}}{{/depend}} {{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if} Which is not clear which for shipping and billing?! Commented Dec 26, 2017 at 7:01
  • It is address template applicable to both addresses Commented Dec 26, 2017 at 8:35
  • OK I need to add in Order confirmation EMail : Bill City: City, Bill Region : Region Also Shipping City: Shipping Region >>> How to use same variables ?? Commented Dec 26, 2017 at 13:31
  • Please check updated answer and accept it Commented Dec 27, 2017 at 5:20
  • Thanks for your help ,,, another question please We need to add City before the value of shipping City, Region word before region ... Can You please Help me in this issue? Commented Dec 27, 2017 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.