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?

Zinat
  • 2,069
  • 2
  • 28
  • 52

1 Answers1

1

Try following way:


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

NB: Don't modify core code.

Sohel Rana
  • 35,846
  • 3
  • 72
  • 90