• Welcome to KonaKart Community Forum. Please login or sign up.
 

XML_IO Import

Started by lorykk66, June 05, 2013, 10:38:00 am

Previous topic - Next topic

lorykk66

Hi all,
i am using XML_IO to import data into Konakart (v. 6.6 EE).
I configured xml_io config file to import only products and manufacturers.
The import functionality works fine and no errors are displayed but i see that only insert statements are performed into tables.
It seems that productsId and manufacturerId specified into XML files are ignored and new records are inserted into tables with different id's.
For example: importing the manufacturers.xml below to update manufacturer id = 28 i see that the import procedure creates a new manufacturer with id = 32.
Quote
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AdminManufacturerXML>
    <manufacturers>
        <id>28</id>
        <image>manufacturer/actim.jpg</image>
        <infos>
            <languageId>1</languageId>
            <manufacturerId>28</manufacturerId>
            <url>http://www.acctim.it/</url>;
            <urlClicked>0</urlClicked>
        </infos>
        <infos>
            <languageId>2</languageId>
            <manufacturerId>28</manufacturerId>
            <url>http://www.acctim.co.de/</url>;
            <urlClicked>0</urlClicked>
        </infos>
        <infos>
            <languageId>3</languageId>
            <manufacturerId>28</manufacturerId>
            <url>http://www.acctim.co.de/</url>;
            <urlClicked>0</urlClicked>
        </infos>
        <infos>
            <languageId>4</languageId>
            <manufacturerId>28</manufacturerId>
            <url>http://www.acctim.co.pt/</url>;
            <urlClicked>0</urlClicked>
        </infos>
        <name>NEW_ACCTIM</name>
        <urlClicked>0</urlClicked>
    </manufacturers>
</AdminManufacturerXML>


It's possible to perform updates with xml_io or it is necessary to execute delete statements before import?

Thank you in advance!

ming

Look at the User Guide for caveats on the use of XML_IO.   We use it under specific conditions - such as in store-cloning etc) but it's likely you will find it will not satisfy you as a general-purpose import/update mechanism.

It will always create new Ids for objects that it does not match and try to update.  So, no, it will not use those Ids in the file.  It doesn't use Ids to match but names.

In the vast majority of cases it is better to write an import routine (using the KKAdminIf Admin APIs) that acts in the specific way you require.   This can be far more efficient and accurate than the general-purpose but inevitably-limited XML_IO.

In the next release (v7.0.0.0+) we have added an "Importer Panel" to the Admin App that allows 3 customisable import buttons that you can assign to your own custom import routines.