0
votes

How can I customise the default Magento products import dataflow, in order to edit some fields before inserting them in database.

Which files should I override to do it ?

Thanks a lot for help.

1
see the xml of your dataflow import from backend, it will call some model and method - ivantedja
I have tried to find the good models, but I do not really understand how it works. Some paths or methods will be very helpfull. Thanks - Bizboss

1 Answers

0
votes

Go to System -> Import / Export -> Dataflow profiles -> Import All Products Then go to the tab that contains the XML. You should see this:

<action type="dataflow/convert_parser_csv" method="parse">
    <var name="delimiter"><![CDATA[,]]></var>
    <var name="enclose"><![CDATA["]]></var>
    <var name="fieldnames">true</var>
    <var name="store"><![CDATA[0]]></var>
    <var name="adapter">catalog/convert_adapter_product</var> <!-- override this module -->
    <var name="method">parse</var> <!-- method that will import your data -->
</action>

As you see, the class you must override is Mage_Catalog_Model_Convert_Adapter_Product and the method responsible of importing the data is: parse()