Page 1 of 1

Import product category

Posted: 04 Oct 2016, 11:51
by wenotine
My other question:

How can I import product category from csv?

And, how can I add multi language for the product categories with mapping? (import csv)

Thank you!

Re: Import product category

Posted: 04 Oct 2016, 16:08
by aimeos
There's no category import yet because it's hard to import trees from CSV files.
How many categories do you want to add to your shop?

Re: Import product category

Posted: 05 Oct 2016, 10:17
by George Horvath
aimeos wrote:There's no category import yet because it's hard to import trees from CSV files.
How many categories do you want to add to your shop?
Hi aimeos!

we need category trees by csv like this:

Code: Select all

(hungarian)
FÉRFI
	KABÁTOK
	SAPKÁK
	SÍNADRÁGOK
	SÍKABÁTOK
	BEACH SHORT
	SHORT
	PULÓVER
	ESŐKABÁT
	T-SHIRT
	TÁSKÁK
NŐI
	KABÁTOK
	SAPKÁK
	SÁLAK
	SÍNADRÁGOK
	SÍKABÁTOK
	SHORT
	PULÓVER
	RUHA
	ESŐKABÁT
	T-SHIRT
	TÁSKÁK
GYEREK
	SÍNADRÁGOK
	SÍKABÁTOK
	T-SHIRT
	
(english)
MENS
	COATS
	BEANIES
	SNOW PANTS
	TECHNICAL JACKETS
	BEACH SHORT
	SHORT
	SWEATSHIRT
	RAINCOAT
	T-SHIRT
	BAGS
WOMEN
	COATS
	BEANIES
	SCARFS
	SNOW PANTS
	TECHNICAL JACKETS
	SHORT
	SWEATSHIRT
	DRESS
	RAINCOAT
	T-SHIRT
	BAGS
JUNIOR
	SNOW PANTS
	TECHNICAL JACKETS
	T-SHIRT

Re: Import product category

Posted: 05 Oct 2016, 21:41
by aimeos
For 27 categories in two languages, the fastest way is to create them by hand in the admin interface. Writing a script that would import them would take much longer.

Re: Import product category

Posted: 03 Mar 2017, 11:26
by George Horvath
We need 2 levels category import. From the csv we can provide the main category code and the sub category code like this:
Main categories: Man | Women | Junior
sub categories like
Man | t-shirts , Women | Bags , Junior | Pants

So I think its a check for if main category doesnt exists then make it and afterwards make the subcategory, then we can add product to it, Or if it exists check for sub and the process afterwards same like in the first case.

If you can give me a test case for category and subcategory adding with a manager i could try to write this dinamycally category creating when importing products from csv.

Re: Import product category

Posted: 03 Mar 2017, 14:26
by aimeos
You can see how to build a category tree in the setup tasks:
https://github.com/aimeos/aimeos-core/b ... ta.php#L72

The category data is located in this file:
https://github.com/aimeos/aimeos-core/b ... atalog.php