Import of categories tree

  • Posts: 40
  • Thank you received: 1
9 years 2 weeks ago #198146

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4.16
-- Browser(s) name and version -- : Chrome 41.0.2272.118 m

Hi, I have problems importing a category tree. the documentation does not answer my questions, so I post it here.
Ist is possible to import the categories tree separately from the product import, or do I have to do the import of categories and products in 1 step?
I have here a sample csv:
parent_category;categories;categories_namekey
1;100;cat1Level1
100;101;cat1Level2
100;102;cat2Level2
101;103;cat1Level3
101;104;cat2Level3
102;105;cat3Level3

it creates sub-categories (on level 2) with the ids as their names. Where is the problem?

Attachments:

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
9 years 2 weeks ago #198169

Hi,

The categories_namekey column doesn't exist.
You should put the name of the categories directly in the categories and parent_category columns like this:
parent_category;categories
;cat1Level1
cat1Level1;cat1Level2
cat1Level1;cat2Level2
cat1Level2;cat1Level3
cat1Level2;cat2Level3
cat2Level2;cat3Level3

And you can even reduce that to:
parent_category;categories
;cat1Level1
cat1Level1;cat1Level2,cat2Level2
cat1Level2;cat1Level3,cat2Level3
cat2Level2;cat3Level3
That's what we explain in the "Importing product categories" section of the import documentation.

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

  • Posts: 31
  • Thank you received: 1
  • Hikashop Business
8 years 6 months ago #216630

Hi Nicolas
I am having similar problems to this. and I am not an expert with csv! So I have a tree like this
Product category
>GS&S
>FG
>EFG

So this is a category (GS&S) which has a sub category (FG) which also has another Sub, category within it.
I have tried exporting the CSV from my categories I have set up including category_depth?
How is this actually presented in the excle spread sheet. Sorry if I am asking the same question but I am struggling to equate the answers to an actual spread sheet. What are the headers for the columns?
Many thanks for your help in advance

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
8 years 6 months ago #216638

You can use such CSV:

parent_category;categories
Product category;GS&S
GS&S;FG
FG;EFG

The following user(s) said Thank You: Harlequin

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

  • Posts: 31
  • Thank you received: 1
  • Hikashop Business
8 years 6 months ago #216774

Thats great thanks, I hadn'tappreciated that the new parent_category would be the immediate one above the category I require.
So I have around 8000 products and many multiple level categories. Can I import them all at the same time or should I set up the categories first as the products will be placed in the CSV along with their category; in the product catalogue serial number order.

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
8 years 6 months ago #216814

Hi,

The best is to do like the CSV you get when you click on the "export" button of the products listing:
First the categories tree is defined at the top of the CSV and then you get the products with the name of their category below.

The following user(s) said Thank You: Bernhard7

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

  • Posts: 40
  • Thank you received: 1
8 years 6 months ago #217345

:cheer:
Export is a great idea. I will do that.
Thanks,
Regards,
Bernhard

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

  • Posts: 40
  • Thank you received: 1
8 years 6 months ago #217346

nicolas wrote: Hi,

The best is to do like the CSV you get when you click on the "export" button of the products listing:
First the categories tree is defined at the top of the CSV and then you get the products with the name of their category below.

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

Time to create page: 0.083 seconds
Powered by Kunena Forum