Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Importing products from non-magento file without field names problem
 
BrotherMouzone
Jr. Member
 
Total Posts:  18
Joined:  2010-06-20
 

I need to import product data from a non-magento made csv file which doesn’t have a leading/header row with column data.

What I found in online articles is:
# - fieldnames – if set to true, it is assumed first row of CSV file contains field names; if set to false map variable is used
# - map – defines fieldnames for files where first row doesn’t contain fieldnames; to see how to define a map take a look at section of this article related to mapping values

and

<action type=“dataflow/convert_mapper_column” method=“map”>
<var name=“map”>
<map name=“category_ids”><![CDATA[categorie]]></map>
<map name=“sku”><![CDATA[reference]]></map>
<map name=“name”><![CDATA[titre]]></map>
<map name=“description”><![CDATA[description]]></map>
<map name=“price”><![CDATA[prix]]></map>
<map name=“special_price”><![CDATA[special_price]]></map>
<map name=“manufacturer”><![CDATA[marque]]></map>
</var>
<var name=“_only_specified”>true</var>
</action>

What I don’t understand is how I can map column names when I have none to begin with. Should I use an index value (0) to get the SKU from the first value of a row? Something like:
<map name=“sku”><![CDATA[0]]></map>

I need to make this a scheduled task in the future so manually editing the field names in there is not a real possibility. The only solution I’m coming up with at the moment is to make a PHP script to add a preset row with column names to the file. However I’d rather just use DataFlow. I’m using Magento 1.4.2.0.

Thank you for any assistance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Turnkeye
Moderator
 
Avatar
Total Posts:  908
Joined:  2008-12-20
URL: turnkeye.com
 

Just add columns names in your CSV in Magento format.

You will be able to import CSV after that.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Soki
Jr. Member
 
Total Posts:  8
Joined:  2011-01-13
 

I’m interrested in the answer also. I believe it could be done somehow!

 
Magento Community Magento Community
Magento Community
Magento Community
 
NELAGeek
Sr. Member
 
Avatar
Total Posts:  193
Joined:  2010-01-23
US
 
Soki - 03 July 2012 04:43 AM

I’m interrested in the answer also. I believe it could be done somehow!

We have just released our Import Evaluation Extension that, I think, will do what you’re trying to do.  Right now, it only works in Magento 1.7.x.  It has the capability of correctly mapping columns and allowing custom columns. i.e. calculated columns and constant value columns.

Great functionality and great price.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top