Import product category

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
wenotine
Posts: 10
Joined: 17 Sep 2016, 15:17

Import product category

Post by wenotine » 04 Oct 2016, 11:51

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!

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Import product category

Post by aimeos » 04 Oct 2016, 16:08

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?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

George Horvath
Posts: 11
Joined: 01 Oct 2016, 10:54

Re: Import product category

Post by George Horvath » 05 Oct 2016, 10:17

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

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Import product category

Post by aimeos » 05 Oct 2016, 21:41

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

George Horvath
Posts: 11
Joined: 01 Oct 2016, 10:54

Re: Import product category

Post by George Horvath » 03 Mar 2017, 11:26

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.

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Import product category

Post by aimeos » 03 Mar 2017, 14:26

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply