Discussions

Commerce Feeds Module, how to put in multiple taxonomy terms. Have posted on commerce feeds bugs page, but can not wait.

Hi,

For anyone using the commerce feeds module http://drupal.org/project/commerce_feeds (particularly Randy Fay, from whom I did learn how to use it http://vimeo.com/22731881).

I was wondering how to put in multiple taxonomy terms.

For instance I make a column in a CSV, say call the column tags, then put in something like the following:

womens,accessories,handbags

Ends up appearing in my product input looking like "womens,accessories,handbags" and there, the three words become one word in my taxonomy terms, the apostrophes gluing them together as one word.

With " " Apostrophes wrapped around it. I assuming these somehow got ripped out of the CSV file, because every column except numeric ones are surrounded by apostrophes.

Now I have had put just one of those terms in a tags columns for one of the items I want to list, then it works fine, no apostrophes surround the term.

If I try making say three separate columns for tags in the CSV file like tags one, tags two and tags three. Then all the tags end up in the chosen taxonomy, but only the last tag for the product, in this instance would be the tag under tags three will show attached to the product. Defeating the purpose of what I was trying to do, which was having all three tags attached to a single product. So I can categorise the products properly. One tag per product is not enough to categorise them.

Thanks from Josh

Posted: Jun 17, 2011

Comments

commercestudy on June 17, 2011

Just tried taking the apostrophe's out from around the terms multiple terms, out of the CSV file. Unfortunately when I uploaded the CSV file apostrophe's where added automatically.

I can not run and hide anywhere away from these apostrophe's when uploading a string of multiple taxonomy terms for a single product.

commercestudy on June 21, 2011

Thanks Randy

Once figured out, feeds tamper works a treat for getting comma separated taxonomy terms in.

I also noticed someone mentioned in the bug trackers on either feeds or feeds tamper, that you can use the search and replace function of feeds tamper to strip out 'periods', decimal point out of prices and replace the period with nothing, so you can write prices in your CSV file, say 170.00, then the decimal point gets stripped out, making 17000, which becomes 170.00 when it appears in your products. Meaning feeds tamper also makes it possible to write prices properly in your CSV file without getting muddled up.