How to extract different shipping address phone ?

jsl
LiteCart Fan
Da Malaysia
Membro dal 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
Da Sweden
Membro dal mag 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
Da Malaysia
Membro dal mar 2018
jsl

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

Questo thread è stato chiuso per lunga inattività. Non è possibile postare su di esso.
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.