CSV formula merge columns to import products to multiple categories and subcatagories
Home > Public Forum > VirtueMart Users Forum > Automated Product Import for VirtueMart > CSV formula merge columns to import products to multiple categories and subcatagories

CSV formula merge columns to import products to multiple categories and subcatagories

Mar 07, 2013
Susan Jackman wrote
This particular issue is why I am testing your product. I need to find the solution with easiest way for my client to be able to create his own import file.

Each product belongs to multiple catagories and one subcat within each category.
I have the categories and subcatagories in separate columns for my import CSV file, I am trying to merge them in Excel using the following formula I found in your documentation:

=B2&"|"&C2
How do I adapt the CSV formula to import products to multiple categories with a subcatagory, for example to replace the following: CAT1 | SUB1 || CAT 2 | SUB 2

I tried the following but excel didn't like the formulas and gave me errors (I'm not very familiar with working in excel with formulas)
=B2&"|"&C2"||"D2&"|"&E2
also tried =B2&"|"&C2 || D2&"|"&E2

What is the correct formula?
Reply
7 Answers
Mar 11, 2013
Susan Jackman wrote
Hello? :)
Mar 11, 2013
New Account agent wrote
Thank you for contacting us! Sorry for late reply.
We had few days off due to national holiday.

You may use following formula: CAT1 | SUB1 || CAT 2 | SUB 2

In result product will be assigned to 2 categories. Or use this expression while importing in Store Manager:
CONCAT('Root Category|',[CSV_COL(1)],'||Root Category|',[CSV_COL(2)])

Unfortunately, we can not assist you how to create formula in Excel, though we can help you to answer all questions regarding our software. Have a great day!
Mar 12, 2013
Susan Jackman wrote
It's a CSV file to import into your software. This is the ONLY way to bulk import into the software and the file has to be done correctly or it won’t work. You answered questions about other CSV related things like custom fields for their CSV file. You have a formula for merging the categories posted on this page of your documentation:
http://store-manager-for-virtuemart-documentation.emagicone.com/products-management/import-products

From your documentation:
    Category - specify the category your product belongs to. If the product should be imported into subcategory use pipe character "|" to separate parent and sub category, for example: "Computers|Keyboards", the product will be assigned to Keyboards category. In case you have categories in separate column, please merge them in Excel using the following formula:
=B2&"|"&C2
where
| - is category delimiter
B2 - is your parent category column in .csv file and 
C2 - is sub category column in .csv file.
If you need to assign the same product to multiple categories, use double delimiter, like this one: "Computers|Keyboards||Computers|Other" in your .csv file. In this case, product will be assigned both to Keyboards sub category and to Other subcategory while import. In our case Pipe is used as category delimiter. 

Unfortunately your documentation is lacking but someone must know how to do it.
Mar 14, 2013
New Account agent wrote
Thank you for reply.

Please, provide us with your excel or .csv file.
Please, submit a ticket here:
http://support.emagicone.com/submit_ticket
and attach details. We will provide you with instructions how to assign product to multiple categories and one subcategory within each category as for your example.

Waiting to hear from you!

Mar 14, 2013
Susan Jackman wrote
I have already started a ticket about this so I will post it there. I just need to add some notes tot he CSV file and I will post it asap. Thank you!
Mar 15, 2013
New Account agent wrote
Thank you!

We received your ticket, will check it as soon as possible and provide you with solution. Have a great day!
Mar 15, 2013
Susan Jackman wrote
thank you very much