如何从订单运送数据中获取客户电话?


Answers:



4

Ganesh,您可以通过以下代码的usig从订单运送地址获取客户电话号码:

$orderOBject->getShippingAddress()->getTelephone();

如果是这样的 type of order is virtual话,您does not get telephone no来自送货地址。因为magento不会保存虚拟订单的送货地址


1

这为我工作:

$Phone = Mage::getSingleton('customer/session')->getCustomer()
    ->getPrimaryBillingAddress()
    ->getTelephone();

这项工作,如果您需要在帐户部分中显示。为了不能执行此命令
Pratik Kamani
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.