如何以编程方式更改Bigcommerce Order上的交付日期

时间:2016-05-11 19:12:22

标签: javascript ajax bigcommerce

我使用ajax在我的bigcommerce网站上添加星期六送货附加费。基本上,我在点击星期六交货日期时将附加费作为另一种产品添加:

$.ajax({type:"GET", url:"http://www.url.com/cart.php?action=add&product_id=138", success: function(text) 

我们注意到的问题是此方法将整个订单的交货日期更改为当前日期。产品本身没有自己的交货日期。

我试图通过添加" delivery_date"来解决这个问题。和" deliveryDate" (从xml产品导出)到ajax调用,但它没有产生任何结果。

这是一个示例订单导出:

<orders>
    <order>
        <Order_ID><![CDATA[358]]></Order_ID>
        <Customer_ID><![CDATA[0]]></Customer_ID>
        <Customer_Name><![CDATA[]]></Customer_Name>
        <Customer_Email><![CDATA[]]></Customer_Email>
        <Customer_Phone><![CDATA[]]></Customer_Phone>
        <Order_Date><![CDATA[11/05/2016]]></Order_Date>
        <Order_Status><![CDATA[Awaiting Payment]]></Order_Status>
        <Subtotal_inc_tax><![CDATA[140.00]]></Subtotal_inc_tax>
        <Subtotal_ex_tax><![CDATA[140.00]]></Subtotal_ex_tax>
        <Tax_Total><![CDATA[0.00]]></Tax_Total>
        <Shipping_Cost_inc_tax><![CDATA[0.00]]></Shipping_Cost_inc_tax>
        <Shipping_Cost_ex_tax><![CDATA[0.00]]></Shipping_Cost_ex_tax>
        <Ship_Method><![CDATA[Free Shipping]]></Ship_Method>
        <Handling_Cost_inc_tax><![CDATA[0.0000]]></Handling_Cost_inc_tax>
        <Handling_Cost_ex_tax><![CDATA[0.0000]]></Handling_Cost_ex_tax>
        <Order_Total_inc_tax><![CDATA[140.00]]></Order_Total_inc_tax>
        <Order_Total_ex_tax><![CDATA[140.00]]></Order_Total_ex_tax>
        <Payment_Method><![CDATA[Pay in Store]]></Payment_Method>
        <Total_Quantity><![CDATA[2]]></Total_Quantity>
        <Total_Shipped><![CDATA[0]]></Total_Shipped>
        <Date_Shipped><![CDATA[]]></Date_Shipped>
        <Order_Currency_Code><![CDATA[USD]]></Order_Currency_Code>
        <Exchange_Rate><![CDATA[1.0000000000]]></Exchange_Rate>
        <Order_Notes><![CDATA[]]></Order_Notes>
        <Customer_Message><![CDATA[]]></Customer_Message>
        <Billing_First_Name><![CDATA[f]]></Billing_First_Name>
        <Billing_Last_Name><![CDATA[f]]></Billing_Last_Name>
        <Billing_Company><![CDATA[ Traveler]]></Billing_Company>
        <Billing_Street_1><![CDATA[That Road]]></Billing_Street_1>
        <Billing_Street_2><![CDATA[That Road]]></Billing_Street_2>
        <Billing_Suburb><![CDATA[San Fran]]></Billing_Suburb>
        <Billing_State><![CDATA[CA]]></Billing_State>
        <Billing_Zip><![CDATA[1234567]]></Billing_Zip>
        <Billing_Country><![CDATA[United States]]></Billing_Country>
        <Billing_Phone><![CDATA[thah]]></Billing_Phone>
        <Billing_Email><![CDATA[test@gmail.com]]></Billing_Email>
        <Shipping_First_Name><![CDATA[d]]></Shipping_First_Name>
        <Shipping_Last_Name><![CDATA[d]]></Shipping_Last_Name>
        <Shipping_Company><![CDATA[Company]]></Shipping_Company>
        <Shipping_Street_1><![CDATA[That Road]]></Shipping_Street_1>
        <Shipping_Street_2><![CDATA[That Road]]></Shipping_Street_2>
        <Shipping_Suburb><![CDATA[San Frab]]></Shipping_Suburb>
        <Shipping_State><![CDATA[CA]]></Shipping_State>
        <Shipping_Zip><![CDATA[1234567]]></Shipping_Zip>
        <Shipping_Country><![CDATA[United States]]></Shipping_Country>
        <Shipping_Phone><![CDATA[]]></Shipping_Phone>
        <Shipping_Email><![CDATA[]]></Shipping_Email>
        <Product_Details>
            <item>
                <Product_ID><![CDATA[86]]></Product_ID>
                <Product_Qty><![CDATA[1]]></Product_Qty>
                <Product_SKU><![CDATA[]]></Product_SKU>
                <Product_Name><![CDATA[Lobster, Whole - Select]]></Product_Name>
                <Product_Weight><![CDATA[1.0000]]></Product_Weight>
                <Product_Variation_Details><![CDATA[Lobster, Whole - Select: 1 select lobster ($110), How do you want them prepared? Live (uncooked), Delivery Date: May 28th 2016]]></Product_Variation_Details>
                <Product_Unit_Price><![CDATA[120.00]]></Product_Unit_Price>
                <Product_Total_Price><![CDATA[120.00]]></Product_Total_Price>
            </item>
            <item>
                <Product_ID><![CDATA[138]]></Product_ID>
                <Product_Qty><![CDATA[1]]></Product_Qty>
                <Product_SKU><![CDATA[]]></Product_SKU>
                <Product_Name><![CDATA[Saturday Shipping Surcharge]]></Product_Name>
                <Product_Weight><![CDATA[0.0000]]></Product_Weight>
                <Product_Variation_Details><![CDATA[]]></Product_Variation_Details>
                <Product_Unit_Price><![CDATA[20.00]]></Product_Unit_Price>
                <Product_Total_Price><![CDATA[20.00]]></Product_Total_Price>
            </item>
        </Product_Details>
        <Store_Credit_Redeemed><![CDATA[0.00]]></Store_Credit_Redeemed>
        <Gift_Certificate_Amount_Redeemed><![CDATA[0.00]]></Gift_Certificate_Amount_Redeemed>
        <Gift_Certificate_Code><![CDATA[]]></Gift_Certificate_Code>
        <Gift_Certificate_Expiration_Date><![CDATA[]]></Gift_Certificate_Expiration_Date>
        <Coupon_Details>
        </Coupon_Details>
    </order>
</orders>

所以,问题是:有没有办法以编程方式为产品或订单添加交货日期?或者或许是另一种方法来阻止人们实际订购的产品更改交货日期?

0 个答案:

没有答案