我正在使用SOAP API v2将我的应用程序与Magento集成
我需要将电子邮件设置为帐单地址。目前可以通过shoppingCartInfo
API调用查看账单地址邮件(见shoppingCartAddressEntity
字段说明),但是好像没有办法通过API调用设置shoppingCartCustomerAddresses
(没有这个字段shoppingCartCustomerAddressEntity
)。
有什么办法可以做到这一点?
我正在使用SOAP API v2将我的应用程序与Magento集成
我需要将电子邮件设置为帐单地址。目前可以通过shoppingCartInfo
API调用查看账单地址邮件(见shoppingCartAddressEntity
字段说明),但是好像没有办法通过API调用设置shoppingCartCustomerAddresses
(没有这个字段shoppingCartCustomerAddressEntity
)。
有什么办法可以做到这一点?
尝试创建自定义客户地址属性,
之后你可以
$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy->login('apiUser', 'apiKey');
$shoppingCartId = $proxy->call( $sessionId, 'cart.create', array( 'magento_store' ) );
$arrAddresses = array(
array(
"mode" => "shipping",
"firstname" => "testFirstname",
"lastname" => "testLastname",
"email" => "testEmail", // this is your custom attribute (email) on address.
"company" => "testCompany",
"street" => "testStreet",
"city" => "testCity",
"region" => "testRegion",
"postcode" => "testPostcode",
"country_id" => "id",
"telephone" => "0123456789",
"fax" => "0123456789",
"is_default_shipping" => 0,
"is_default_billing" => 0
),
array(
"mode" => "billing",
"address_id" => "customer_address_id"
)
);
$resultCustomerAddresses = $proxy->shoppingCartCustomerAddresses(
$sessionId,
array(
$shoppingCartId,
$arrAddresses,
)
);