Discussions

How to add Custom CSV Headers with Commerce Feeds

Hi,
can someone point me to the correct direction to add custom CSV headers to the Feed Product Importer and Feed Node Importer ?

I wand to add the following information to each imported product so i dont have to do it manually.

1) URL alias :
Example: CSV Header : URL ALIAS
Content : catalog/name_of_the_product

2) Publishing Options :
Example: CSV Header : PUBLISH
Content : Pu or Pr or St

PU = Published
PR = Promoted to front page
ST = Sticky at top of lists

3) Taxonomy / Terms :
How to display the product in 2 or MORE categories (taxonomy/terms)

Product: SKU 123 (the name of the product)
Example: Taxonomy - Catalog Shoes
Term - Nike
Example: Taxonomy - Catalog Sports
Term - Running

When i click on BLOCK Catalog Shoes // Nike, product SKU 123 will be displayed along with other products in that shoes//nike category. The same product when i click on BLOCK Catalog Sports // Running, product SKU 123 will be displayed along with other products in that sports//running category.
My thoughts of this is to import a CSV file with:
CSV Header: Taxonomy OR Catalogs
Content: Catalog Shoes >> Nike // Catalog Sports >> Running // ... (Vocabulary Name >> Term Name >> Term Name >> etc...)

4) Add multiple images (title + discription + image) not just 1 image without ALT and Description :
1st Image...
Example: CSV Header : Image 1
Content : http://ecx.images-amazon.com/images/I/71H34BJ3FHL.gif
Example: CSV Header : Image 1 - title
Content : Computer Music 2nd Ed
Example: CSV Header : Image 1 - alt text
Content : Computer Music 2nd Ed
2nd Image...
Example: CSV Header : Image 2
Content : http://ecx.images-amazon.com/images/I/61yWnkw041L.jpg
Example: CSV Header : Image 2 - title
Content : Computer Music 2nd Ed
Example: CSV Header : Image 2 - alt text
Content : Computer Music 2nd Ed
etc..

last thing, i dont understand why i have to use the Feeds Tamper to modify the price from $1.50 to convert it to cents 150, why it this required ?

I have over 2,000 products i need to convert from BigCommerce CSV Style to Drupal Commerce CSV Style.
Help is needed please.
Thanks

Posted: Oct 26, 2011

Comments

ISO on October 26, 2011

Also a custom CSV Header for Products Inventory
example: Stock and WarningStock
content: 20 / 5

This will tell the system that i have 20 products and to warm me when a low stock of 5 is reach.

switch on October 27, 2011

I don't know the answer for fields with multiple values because i haven't had to deal with that yet but the rest of them are fairly simple.

Just make sure manage the fields on your product type and add those fields. When you do the import, I would clone the product importer and modify your clone to map those new fields. Mapping is located under the processor heading in the left-hand nav bar in your importer.

I know image should already be a field associated with your product so you won't have to add that one but I just don't know how to deal with multiple values. Might need to fool around with that one a bit.

Not sure why it makes you convert the price to cents but you should be able to run a couple of simple excel formulas to remove the $. from your price column. http://www.techonthenet.com/excel/formulas/substitute.php just substitute them with "".

ISO on October 28, 2011

thanks for your feedback.

switch: i will play a bit more with product types. I wish this was as simple as in BigCommerce ;P

ISO on October 28, 2011

Thanks for the feedbacks.

rfay: i have, even downloaded the MP4 videos and watched them over and over again. Maybe there's some things i didn't understood correctly from your tutorials ?