Rohit Goel
Rohit Goel

Reputation: 3554

Configure magmi to import or create categories from multiple columns in magento

Hi i have a csv in which the product categories are in 3 columns .

say column1 == parent category 
    column 2 = subcategory
    column 3 subcategory of column 2

Now can you please tell me how can i configure magmi to import categories from multiple columns.

Upvotes: 0

Views: 2179

Answers (1)

adprocas
adprocas

Reputation: 1913

I am also using a csv (actually, it's a ~ delimited file).

You want to use one column for the categories and separate them by something, but let MAGMI know. I'll explain that part in a bit.

Anyway, my csv file looks like this...

    categories~cost~sku
    Catalog|Computer Components|DRAM DDR3|> 2GB~154~mysku

So, Catalog is the parent category, then Computer Components, then DRAM DDR3, then > 2GB

If you wanted to add another category - let's say Catalog->Computers->Upgrade Components (not that you would ever have a category for that), you'd do the following

    categories~cost~sku
    Catalog|Computer Components|DRAM DDR3|> 2GB,Catalog|Computers|Upgrade Components~154~mysku

The | separates the categories in their parent-child relationships.

The comma (why I don't use an actual csv) separates the two different categories you want to add.

Now, for the MAGMI configuration.

You're going to be using the "On the fly category creator/importer". I can't recall if it is installed by default. I believe it is. If not, it's easy to install plugins. Look it up.

Anyway, you'll want that checked off and then click on "configure" beside it.

Set "Assing product to" (you read that correctly) to "all categories in tree"... that is, unless you don't want your products to be added to all the categories in the tree. So, it would add the product to Catalog AND Computer Components AND ..and so on.. If you have this set differently it will only add to the last categories (> 2GB AND Upgrade Components).

Set the "Tree level separator" to |

base category tree will depend on how you have configured yours to work. I include Catalog, which is my base level tree, so I have this blank.

I would suggest keeping the url ending in html

I hope that makes sense and it what you're looking for.

I re-read your question. I think I answered it above, but in a little more detail than you need probably. You can't really have multiple categories in multiple columns and try to import them. The way I described (importing them using a different delimiter) and using the on the fly category creater/importer is the only way I have been able to efficiently gain control over category management with MAGMI. So, create your csv file using a one column method for categories and you should be good. I also suggest using ~ delimited files, rather than comma - comma is used in a lot of other places and would be more prone to issues. For example, if you want to include two stores you would do "store1, store2" and MAGMI will know how to include them. If you forgot the quotes the import might would work fine (with warnings or errors), but it would assume the comma is there to separate different columns and likely throw bad data into other columns, rather than the proper values for that column.

I hope that all makes sense.

Upvotes: 1

Related Questions