【发布时间】:2017-03-16 09:53:39
【问题描述】:
我正在为我的 Shopify 商店制作一个私人应用程序。该应用程序应该取代标准的结帐流程。 一切正常,订单发送到我的 Shopify 商店,我可以在管理区域看到它,我面临的唯一问题是下订单后购物车属性不会重置(客户的产品仍然存在购物车,最重要的是,购物车令牌不会改变)。 任何人都知道为什么会发生这种情况以及我该如何解决?我在想也许我没有向商店发送足够的信息,但我可能错了。这是我要发送的内容:
$product = $shopify('POST /admin/orders.json', array(), array
(
'order' => array
(
"email" => $email,
"fulfilment_status" => "",
"send_receipt" => true,
"line_items" => $products,
'customer' => array
(
"first_name" => $firstName,
"last_name" => $name,
"email" => $email
),
'billing_address' => array
(
"first_name" => $firstName,
"last_name" => $name,
"address1" => $adress,
"phone" => $telefon,
"city" => $city,
"province" => $province,
"country" => $country,
"zip" => $zip
),
'note_attributes' => array (
array("name" => "Company", "value" => $company),
array("name" => "CUI","value" => $cui),
array("name" => "Registration","value" => $reg)
),
'shipping_address' => array
(
"first_name" => $firstName,
"last_name" => $name,
"address1" => $adress,
"phone" => $phone,
"city" => $city,
"province" => $province,
"province_code" => $provinceCode,
"name" => $firstName." ".$name,
"country_code" => $countryCode,
"country" => $country,
"zip" => $zip
),
'shipping_lines' => $shipping,
'financial_status' => 'pending'
)
));
【问题讨论】: