0

Based on this answer, to have the customer email address, I edited the $shippingAddress in app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php like below, but it makes the shipping section in pdf show nothing. The customer is NOT LOGGED IN, does it matter? how to fix this?

$shippingAddress = $this->_formatAddress($order->getShippingAddress()->format('pdf')).'|'.Mage::helper('sales')->__('Email:').$order->getCustomerEmail();

I'm wondering if .'|'.Mage::helper('sales')->__('Email:').$order->getCustomerEmail(); is correct?

1

Try following way:


$shippingAddress = $this->_formatAddress($order->getShippingAddress()->format('pdf'));
$billingAddress[] = Mage::helper('sales')->__('Email:').$order->getCustomerEmail();

NB: Don't modify core code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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