【发布时间】:2021-09-28 04:23:30
【问题描述】:
我已经为我的 wordpress 网站构建了一个 React Native 电子商务应用程序。该应用程序已完成。我只对订单商品税有疑问。网站上的产品价格是含税的,所以当客户订购价格为 10 澳元的产品时,它是含税的。
显示在移动应用上的产品不会保存在 woocommerce 中,而是保存在 mongoDB 数据库中。因此,当我使用 WC-API 在网站上下订单时,会在商品价格的基础上加收 10% 的税。以下是一些截图供参考:
这是我发送到 api 的 JSON:
Object {
"billing": Object {
"address_1": xx",
"address_2": "",
"city": "Arndell Park",
"country": "AU",
"email": "xx",
"first_name": "xx",
"last_name": "x",
"phone": "+xx",
"postcode": "x",
"state": "x",
},
"currency": "AUD",
"currency_symbol": "$",
"customer_id": 30043,
"customer_note": "",
"line_items": Array [
Object {
"__v": 0,
"_id": "613045905291cccac594dc68",
"cardId": "61303af6397497e57935c979",
"description": "",
"image": "https://firebrandbbq.com.au/wp-content/uploads/2021/07/lanes-pepper-1.jpg",
"images": Array [
Object {
"_id": "613045905291cccac594dc69",
"alt": "",
"date_created": "2021-07-21T01:50:32",
"date_created_gmt": "2021-07-20T05:50:32",
"date_modified": "2021-08-20T00:49:39",
"date_modified_gmt": "2021-08-19T04:49:39",
"id": 84060,
"name": "lanes-pepper-1",
"src": "https://firebrandbbq.com.au/wp-content/uploads/2021/07/lanes-pepper-1.jpg",
},
],
"instock": 11,
"name": "Lanes BBQ BLACK PEPPER (16 Mesh) Seasoning 226g",
"price": 9.99,
"quantity": 1,
"shortDesc": "Use the same ingredients that’s in all the Lane’s BBQ rubs, just in bulk! For the purest out there. This big bold large grain black pepper will add more flavor than the finely ground black pepper in your little bird-shaped shaker. This 16 mesh black pepper will go perfectly on steaks before they hit the grill, chicken, pasta, really it adds a strong flavor to all cuts of meat. Part of the Lanes Specialty range of seasonings. Shaker Jar: 226g ",
"sku": "app-LRSPPEP",
"total": "8.991",
"was": 14.95,
"weight": 0.22,
},
],
"payment_method_title": "Credit Card",
"set_paid": true,
"shipping": Object {
"address_1": "",
"address_2": "",
"city": "",
"company": "",
"country": "AU",
"email": "kamrul@firebrandbbq.com.au",
"first_name": "Kamrul",
"last_name": "Islam",
"phone": "+61424575514",
"postcode": "",
"state": "",
},
"shipping_lines": Array [
Object {
"method_id": "NSW click and collect",
"method_title": "Click and Collect",
"total": "0",
},
],
"status": "processing",
"transaction_id": "null",
}
我如何告诉 Woocommerce API 订单项数组中的产品,总价格已经含税,所以项目价格不超过列出的价格?
【问题讨论】:
标签: wordpress react-native woocommerce axios woocommerce-rest-api