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.
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.
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()