Wednesday, 15 April 2015

php - Magento invoice get shipping address -



php - Magento invoice get shipping address -

i want show shipping address of order on invoices. working pretty with:

$shipping = nl2br($order->getshippingaddress()->format('html')); $shipping = explode('<br />',$shipping);

but if have order download product (gift card) a:

fatal error: phone call fellow member function format()...

because order not have shipping address. how can check, whether $order->getshippingaddress() contains info or, if not, not displaying it?

php magento

No comments:

Post a Comment