Api 如何创建具有地址和获取状态消息的Bigcommerce客户
我正在尝试创建具有配送地址的新客户,然后希望他们重定向到显示“谢谢”或“错误”消息的页面。我使用了: $createFields = array( 'first_name'=>$first_name, 'last_name'=>$last_name, 'email'=>$email, 'company'=>$company, 'phone'=>$phone, 'addresses'=>array( 'first_name'=>$first_name, 'last_name'=>$last_name, 'phone'=>$phone, 'street_1'=>$street_1, 'city'=>'', 'state'=>'', 'zip'=>'', 'country'=>'' ) ); $customers = Bigcommerce::createCustomer($createFields); $createFields=array( “first\u name”=>$first\u name, “姓氏”=>$last\u name, “email”=>$email, “公司”=>$company, 'phone'=>$phone, '地址'=>数组( “first\u name”=>$first\u name, “姓氏”=>$last\u name, 'phone'=>$phone, “street_1”=>$street_1, “城市”=>“, '状态'=>'', 'zip'=>'', “国家”=>“ ) ); $customers=Bigcommerce::createCustomer($createFields); 创建客户,但根本不起作用。一旦我删除“地址”字段,就会创建新客户 有人能帮我告诉我如何添加客户地址吗?另外,我如何检查客户是否已正确创建? 客户可能尝试重新注册自己-系统应显示错误“电子邮件已存在” 我是新的BigCommerceAPI-任何帮助将不胜感激Api 如何创建具有地址和获取状态消息的Bigcommerce客户,api,bigcommerce,Api,Bigcommerce,我正在尝试创建具有配送地址的新客户,然后希望他们重定向到显示“谢谢”或“错误”消息的页面。我使用了: $createFields = array( 'first_name'=>$first_name, 'last_name'=>$last_name, 'email'=>$email, 'company'=>$company, 'phone'=>$phone,
感谢在Bigcommerce类Client.php中,您可以找到一个名为createCustomerAddress的方法。您只需将要添加的客户id和地址传递给它。 例如:
$address = array(
'country'=>'United States',
'first_name'=>'First',
'last_name'=>'Last',
'street_1'=>'5543 Ave34',
'city'=>'Miami',
'state'=>'Florida',
'zip'=>'54023',
'phone'=>'783 000 0000'
);
Bigcommerce::createCustomerAddress($customer_id, $address);