Page 1 of 1

Questions concerning csv-imports

Posted: 04 Feb 2018, 08:23
by rheinertp
Dear Aimeos-team,
I am using: Aimeos-Typo3 (18.1.0 with T3 8.7.9), Ubuntu 16 (docker) with PHP 7.2.1
I am really enthusiastic about aimeos! We used Magento 1 before - and we are really not sure to switch to Magento 2 - we are therefore checking alternatives (and as we use Typo3 as CMS .. aimeos could be first choice!!)
I played around espacially with the imports and got the following questions:

1) All import for one processor automatically delete all existing values for the article / processor, right?
Thus it is not possible to import a file like <<I want to import several information for one article in different lines - not in different columns)
"product.code","product.type","attribute.type","attribute.code","attribute.label"
"1051WB17", "default","color","mehrfarbig","mehrfarbig"
"1051WB17", "default","collection","White Energy","White Energy"
"1051WB17", "default","warengruppe","Bordüre","Bordüre"

In this case only the last entry is taken. When I create a new file (i.e. with only color) - all other attributes for that article are deleted first. .. This means I do have to put all information to one article in one line ... ??
-----------------
2.) Is it possible to define "default" values in the TSConfig of Typo3? i.e:
in the example below "product.type" is always "default"; "text.type" is always "short"
mapping{
item{
0 = product.code
1 = product.label
2 = product.type
}
text{
3 = text.type
4 = text.content
}
}

Maybe something like:
mapping{
item{
0 = product.code
1 = product.label
"default" = product.type
}
text{
"short" = text.type
2 = text.content
}
}
In this case the csv-file needs only 3 columns (and easier to create)
------------------------
3.) It would be fantastic if will be possible to import categories as well.
That also bring aimeos nearer to our current export logic on which our content feed is based.

Thanks so much!
PAscal

Re: Questions concerning csv-imports

Posted: 04 Feb 2018, 15:34
by aimeos
rheinertp wrote: 1) All import for one processor automatically delete all existing values for the article / processor, right?
Thus it is not possible to import a file like <<I want to import several information for one article in different lines - not in different columns)
"product.code","product.type","attribute.type","attribute.code","attribute.label"
"1051WB17", "default","color","mehrfarbig","mehrfarbig"
"1051WB17", "default","collection","White Energy","White Energy"
"1051WB17", "default","warengruppe","Bordüre","Bordüre"
Yes, the attributes that are not any more in the same CSV line will get deleted. In your example it would be impossible to remove old attributes. You could only add new ones without touching the existing ones because you don't know with you can delete. But you can define as many attribute columns as you need. The empty ones will be ignored.
rheinertp wrote: 2.) Is it possible to define "default" values in the TSConfig of Typo3? i.e:
in the example below "product.type" is always "default"; "text.type" is always "short"
Not yet, only for most types "default" is assumed if none is given. If you would like to create a pull request with the necessary code, we will add it to the core :-)
rheinertp wrote: 3.) It would be fantastic if will be possible to import categories as well.
That also bring aimeos nearer to our current export logic on which our content feed is based.
Importing a category tree from CSV is more challenging but not impossible. The main problem is how moving categories is handled. How should the file look like in your case?

Re: Questions concerning csv-imports

Posted: 05 Feb 2018, 18:04
by rheinertp
aimeos wrote:
rheinertp wrote: ...
rheinertp wrote: 3.) It would be fantastic if will be possible to import categories as well.
That also bring aimeos nearer to our current export logic on which our content feed is based.
Importing a category tree from CSV is more challenging but not impossible. The main problem is how moving categories is handled. How should the file look like in your case?
My suggestion is:
catalog{
catalog.code
catalog.label
catalog.level
catalog.parent
catalog.position
}
i.e.
"firstlevel1", "Home",0,,1
"secondlevel1", "Series",1,"fistlevel1",1
"secondlevel2", "Categories",1,"fistlevel1",2
"thirdlevel1", "AnyWay",2,"secondlevel1",1
"thirdlevel2", "BasicTiles",1,"secondlevel2",1
"thirdlevel3", "Amadea",2,"secondlevel1",2

<<Of course one has to take care to create the upper levels before the lower once as there are references...>>

Thanks a lot!
PAscal

Re: Questions concerning csv-imports

Posted: 25 Feb 2018, 16:39
by aimeos
Good news! The dev-master branch contains a catalog importer for CSV files now and it would be great if you can test it. Here's the documentation: https://aimeos.org/docs/Developers/Cont ... g_from_CSV

Contrary to your example, "catalog.level" and "catalog.position" can not be imported because this is internal data only. They will be set accordingly based on the values of "catalog.parent" and the order of the lines in the CSV file.