Woocommerce XML订单导出

时间:2018-10-23 19:36:28

标签: xml woocommerce export orders

G'day,

我不知道如何创建一个包含所有带有自定义元素标题的订单数据的XML,就像这样;我检查了很多插件,WooCommerce的Advanced Order Export看上去最有前途。

这就是我所需要的,详细信息,税项等分开

<order order_id="12759">
<details>
        <shopname>Company name</shopname>
        <order_date>2018-07-20 14:25:52</order_date>
        <base_currency_code>EUR</base_currency_code>
        <user_currency_code>EUR</user_currency_code>
        <weight_unit>kg</weight_unit>
        <total_weight>0.9500000000000001</total_weight>
        <tax_area>Germany</tax_area>
        <tax_exemption_number>0</tax_exemption_number>
    <taxes>
        <name>B.T.W.</name>
        <value>5.17</value>
        <rate>6.00</rate>
    </taxes>
        <fraud_status></fraud_status>
        <total_tax>5.17</total_tax>
        <purchase_exc_discount>91.26</purchase_exc_discount>
        <subtotals incl_tax="yes">91.26</subtotals>
        <total_price_inc_tax>101.21</total_price_inc_tax>
</details>

这就是我要得到的

<?xml version="1.0" encoding="UTF-8"?>
<Orders>
<Order>
  <order_id>4701</order_id>
  <shopname>Company name</shopname>
  <order_date>2018-10-23 18:04</order_date>
  <base_currency_code>EUR</base_currency_code>
  <user_currency_code>EUR</user_currency_code>
  <weight_unit>kg</weight_unit>
  <total_weight>0</total_weight>
  <tax_area>Netherlands</tax_area>
  <tax_exemption_number>0</tax_exemption_number>

  <name>B.T.W</name>
  <value>0</value>
  <rate>0</rate>

  <fraud_status/>
  <total_tax>0</total_tax>
  <purchase_exc_discount>68.49</purchase_exc_discount>
  <subtotals>0</subtotals>
  <total_price_inc_tax>68.49</total_price_inc_tax>

预先感谢:)

1 个答案:

答案 0 :(得分:0)

您应该调整https://algolplus.com/plugins/code-samples/#sample_addons部分中的“ XML插件”

我的回复有点晚了,但我希望能有所帮助。