Categories during import

  • Posts: 279
  • Thank you received: 1
6 years 9 months ago #274035

-- HikaShop version -- : 3.1.1
-- Joomla version -- : 3.7.3
-- PHP version -- : 5.6
-- Error-message(debug-mod must be tuned on) -- : None

I have imported1k+ products from a 3D Cart export. I've tried importing before and never succeeded. However, this time, the stars aligned or something, and it went very smoothly once I'd played with it a bit. Yay!! Feeling very pleased with myself!! :lol:

The 3D Cart export gave categories (in their product listing export) like this:

BATHROOM/Bathroom Accessories@ACCESSORIES@BATHROOM/Bathroom Accessories/SHELVES@ACCESSORIES/Bathroom Mirrors

I found out that the @ is used to show the start of a new category. So I copied and pasted the category column into Notepad, did a Replace all of @ with , and pasted the altered content back into the CSV. I expected the nested categories to be recognized and created as such.However, the import just created (in the case of the export example above) 4 top level categories (that is, they all had the parent of "product category") :

BATHROOM/Bathroom Accessories
ACCESSORIES
BATHROOM/Bathroom Accessories/SHELVES
ACCESSORIES/Bathroom Mirrors

I just ended up going through and manually assigning sub-categories to their correct parents, and removing the extra text. But I'm sure there was a more correct way to set up the product_categories column so the import routine would created nested categories.

What did I do wrong? I've cleaned them up now, but I have a second site for this client to do, and I'd rather not have to waste time editing if I can help it. Thanks.

As an aside, I just discovered "Infinite Scolling" - wow, that's very cool. Thank you for that addition!!

Please Log in or Create an account to join the conversation.

  • Posts: 81513
  • Thank you received: 13068
  • MODERATOR
6 years 9 months ago #274051

Hi,

On each row of a product, you have two main columns related to the categories:
- the "categories" column where you can have the name of the category of the product
- the "parent_category" column where you can have the name of the parent category of the category of the product
If you have more levels, it's best to have extra lines at the top of the CSV file in order to enter the relations parent/child categories so that HikaShop first insert the categories like you want and then import the products.
On the website where you now have the products properly inserted in their categories, click on the "export" button of the products listing and you'll get a CSV which is like that: firs the categories tree and then the categories referenced for each product row.

I'm glad you like the infinite scroll feature :)

Please Log in or Create an account to join the conversation.

  • Posts: 279
  • Thank you received: 1
6 years 9 months ago #274060

Thanks, Nicolas, that makes sense, but the tutorial didn't mention that. At least I didn't read it as that, which could also be operator error!! LOL I ended up manually moving them as there was only about 25-30, but good to properly understand the process.

Please Log in or Create an account to join the conversation.

Time to create page: 0.039 seconds
Powered by Kunena Forum