在Magento API中检索客户的UPS帐号

在Magento API中检索客户的UPS帐号,magento,Magento,在Magento中,客户可以将UPS帐户与其帐户关联,从而可以使用其个人UPS帐户号码发货和付款 我需要通过MagentoAPI(V2)在订单或客户基础上检索这些信息。有人知道这是不是可以通过V2 API提取的数据吗?我试图避免直接击中Magento DB 感谢您将信息保存在系统配置中(Mage::getStoreConfig())。我认为API不允许您访问系统配置,您必须使用代码获取它们: $userid = Mage::getStoreConfig('carriers/ups/us

在Magento中,客户可以将UPS帐户与其帐户关联,从而可以使用其个人UPS帐户号码发货和付款

我需要通过MagentoAPI(V2)在订单或客户基础上检索这些信息。有人知道这是不是可以通过V2 API提取的数据吗?我试图避免直接击中Magento DB


感谢您将信息保存在系统配置中(
Mage::getStoreConfig()
)。我认为API不允许您访问系统配置,您必须使用代码获取它们:

$userid      = Mage::getStoreConfig('carriers/ups/username');
$userid_pass = Mage::getStoreConfig('carriers/ups/password');
$access_key  = Mage::getStoreConfig('carriers/ups/access_license_number');
祝你好运

根据评论编辑

因此,如果您有Customer对象(
$Customer=Mage::getModel('Customer/Customer')->load($customerId);
您可以执行
$Customer->getShippingAccount();
(或任何调用该属性的操作)。您不希望直接查询varchar表。如果您在客户之间循环,您可以这样做

Mage::getModel('customer/customer')->getCollection()
    ->addAttributeToSelect('shipping_account')
    ;

很抱歉造成混淆,我指的是单个客户的发货账号。它作为客户属性存储在customer\u entity\u varchar表中。进一步查看后,我认为这不是“开箱即用”的属性,并通过扩展或插件一次性添加。在我们的系统中,此值的属性ID为1012。