How to extract different shipping address phone ?

jsl
LiteCart Fan
Từ Malaysia
Thành viên kể từ thg 3 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
Từ Sweden
Thành viên kể từ thg 5 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
Từ Malaysia
Thành viên kể từ thg 3 2018
jsl

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

Chủ đề này đã bị đóng do không hoạt động trong thời gian dài. Không thể đăng bài vào chủ đề này.
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.