Magento sales transactional email – highlight if billing address equals shipping address

Insert this code on the desired place in the .html transactional email (deepter in the locale folder):

{{block type='core/template' area='frontend' template='email/shippingcheck.phtml' order=$order}}

Then create the file in the template you’re using (app/design/frontend/default/default/template/email/shippingcheck.phtml) for example. Insert the following content:

getData('order')->getShippingAddress()->format('html') != $this->getData('order')->getBillingAddress()->format('html')) { echo $this->getData('order')->getShippingAddress()->format('html'); } else { echo 'The billing address equals the shipping address.'; } ?>

Leave a Comment

Your email address will not be published. Required fields are marked *

en_USEnglish
Scroll to Top