XML Importer / TYPO3 / attributes and categories won't update and throwing errors
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
XML Importer / TYPO3 / attributes and categories won't update and throwing errors
I am in the process of implementing the XML importer for categories, products and attributes in our shop. Initially, all three XML work really well. Only when I want to import the attributes or the categories a second time I get error messages "... Integrity constraint violation: 1062 Duplicate entry ...".
With the products it works fine. If I delete the categories or attributes in the shop and import them, everything is fine.
Is it possible that an update of the categories and attributes does not work - or what am I doing wrong? Is there anything else I can configure?
I am using aimeos V22.10.5 / TYPO3 11.5.24
With the products it works fine. If I delete the categories or attributes in the shop and import them, everything is fine.
Is it possible that an update of the categories and attributes does not work - or what am I doing wrong? Is there anything else I can configure?
I am using aimeos V22.10.5 / TYPO3 11.5.24
Re: XML Importer / TYPO3 / attributes and categories won't update and throwing errors
The "ref" attribute in the XML nodes must contain the unique key that is required match existing records, e.g.:
It contains record domain, type and value for attributes.
Code: Select all
<attributeitem ref="product|color|black"
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: XML Importer / TYPO3 / attributes and categories won't update and throwing errors
Yess. Thanx! I had some UTF8 encoding Problems. For all having similar problems...
If you are using PHP and simpleXML -> initialize your XML like:
Output:
I had:
Output:
which generates a valid XML, but was not importable to aimeos, because of "Größe" = Größe.
If you are using PHP and simpleXML -> initialize your XML like:
Code: Select all
$this->productsxml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><attributes/>');
Code: Select all
<attributeitem ref="product|Größe|M">
<attribute.domain><![CDATA[product]]></attribute.domain>
<attribute.type><![CDATA[Größe]]></attribute.type>
<attribute.code><![CDATA[M]]></attribute.code>
<attribute.label><![CDATA[Größe-M]]></attribute.label>
</attributeitem>
Code: Select all
$this->productsxml = new SimpleXMLElement('<attributes/>');
Code: Select all
<attributeitem ref="product|Größe|M">
<attribute.domain><![CDATA[product]]></attribute.domain>
<attribute.type><![CDATA[Größe]]></attribute.type>
<attribute.code><![CDATA[M]]></attribute.code>
<attribute.label><![CDATA[Größe-M]]></attribute.label>
</attributeitem>