Quantcast
Channel: Programmierung - Shopware Community Forum
Viewing all articles
Browse latest Browse all 2871

XML Export von Artikeln mit mehreren Iteratoren nicht möglich

$
0
0

Hallo zusammen,

mein XML soll folgenden Aufbau haben:

<Root>
	<Table_Products>
		<Product>
			<products_id>123</products_id>
			<products_model>123</products_model>
			<products_image>http://xyz.de/media/products/10021/image-2.jpg</products_image>
			<products_price>3.00</products_price>
			<Kategorie>1</Kategorie>
		</Product>
	</Table_Products>
	<Table_Description>
		<Description>
			<products_id>123</products_id>
			<products_name>testArtikelName</products_name>
		</Description>
	</Table_Description>
</Root>

"Product" und "Description" sind article-Iteratoren. Hier das von mir erstellte Profil als JSON:

{
    "name": "docdata Artikel v2",
    "type": "articles",
    "tree": {
        "id": "root",
        "name": "Root",
        "type": "",
        "index": 0,
        "shopwareField": "",
        "defaultValue": "",
        "children": [
            {
                "id": "585a85d459213",
                "type": "",
                "index": 0,
                "name": "Table_Products",
                "shopwareField": "",
                "defaultValue": "",
                "children": [
                    {
                        "id": "585a85e0022d3",
                        "name": "Product",
                        "index": 0,
                        "type": "iteration",
                        "adapter": "article",
                        "parentKey": "",
                        "children": [
                            {
                                "id": "585a85ef2e83b",
                                "type": "leaf",
                                "index": 0,
                                "name": "products_id",
                                "shopwareField": "mainNumber",
                                "defaultValue": ""
                            },
                            {
                                "id": "585a935cb8900",
                                "type": "leaf",
                                "index": 1,
                                "name": "prodcuts_model",
                                "shopwareField": "mainNumber",
                                "defaultValue": ""
                            },
                            {
                                "id": "585a937c96905",
                                "name": "products_image",
                                "index": 2,
                                "type": "iteration",
                                "adapter": "image",
                                "parentKey": "articleId",
                                "shopwareField": "",
                                "defaultValue": ""
                            },
                            {
                                "id": "585a938aaa857",
                                "type": "leaf",
                                "index": 3,
                                "name": "prodcuts_price",
                                "shopwareField": "purchasePrice",
                                "defaultValue": ""
                            },
                            {
                                "id": "585a93a2a6a51",
                                "type": "leaf",
                                "index": 4,
                                "name": "Kategorie",
                                "shopwareField": "name",
                                "defaultValue": ""
                            }
                        ],
                        "shopwareField": "",
                        "defaultValue": ""
                    }
                ]
            },
            {
                "id": "585a8a2372906",
                "type": "",
                "index": 1,
                "name": "Table_Descriptions",
                "children": [
                    {
                        "id": "585a8a28e66fc",
                        "name": "Description",
                        "index": 0,
                        "type": "iteration",
                        "adapter": "article",
                        "parentKey": "",
                        "children": [
                            {
                                "id": "585a8a36b4845",
                                "type": "leaf",
                                "index": 0,
                                "name": "products_id",
                                "shopwareField": "mainNumber",
                                "defaultValue": ""
                            },
                            {
                                "id": "585a93da05686",
                                "type": "leaf",
                                "index": 1,
                                "name": "products_name",
                                "shopwareField": "name",
                                "defaultValue": ""
                            }
                        ],
                        "shopwareField": "",
                        "defaultValue": ""
                    }
                ],
                "shopwareField": "",
                "defaultValue": ""
            }
        ]
    }
}

 

Nach dem Export erhalte ich folgende XML-Datei:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Root>
<Table_Products>
  <Description>
    <products_id>123</products_id>
    <products_name>testArtikelName</products_name>
  </Description>
</Table_Products>
<Table_Descriptions>

Hat jemand eine Idee wie ich ich falsch gemacht habe.

Vielen Dank im voraus für die Antworten :)


Viewing all articles
Browse latest Browse all 2871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>