How to extract different shipping address phone ?

jsl
LiteCart Fan
Dari Malaysia
Anggota sejak Mar 2018
jsl

Hi everyone,

During checkout, user can choose different shipping address

[img]https://bit.ly/2BMBSh3[/img]

How to extract the different shipping address phone number to be used in printable_order_copy.inc.php ? 
Currently I only can extract customer details phone number using 

<?php echo !empty($order['customer']['phone']) ? $order['customer']['phone'] : '-'; ?>

However if a user choose different shipping address, the order copy only show customer detail phone number. I need the different shipping address phone number to be shown in printable_order_copy.inc.php . Anyone know how to ? 

Kindly share it with me , your share is most appreciated . Thank you and have a nice day :-)

tim
Founder
Dari Sweden
Anggota sejak Mei 2013
tim

Try this:

<?php echo !empty($order['customer']['shipping_address']['phone']) ? $order['customer']['shipping_address']['phone'] : '-'; ?>

Or to fallback on customer phone

<?php echo !empty($order['customer']['shipping_address']['phone']) ? $order['customer']['shipping_address']['phone'] : $order['customer']['phone']; ?>

jsl
LiteCart Fan
Dari Malaysia
Anggota sejak Mar 2018
jsl

Thank you so much Tim.. it is working :-)

This thread has been closed due to long inactivity. Posting to it is not possible.
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.