Product csv import: new attribute type

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!
heural
Posts: 58
Joined: 09 Jun 2022, 07:55

Product csv import: new attribute type

Post by heural » 14 Jun 2022, 12:52

Is it possible to add a new attribute type during the product import?

I´ve created a decorator class and before the main import is called, I transform the incoming product data to the aimeos-schemata.
Now there are new attribute types incoming (e.g. pages for photobooks) an i would create these new type "on the fly".

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

Re: Product csv import: new attribute type

Post by aimeos » 16 Jun 2022, 11:04

You can use the attribute/type manager to add new types on the fly:

Code: Select all

$manager = \Aimeos\MShop::create( $context, 'attribute/type' );
$manager->save( $manager->create()->setCode( 'pages' )->setLabel( 'Pages ) );
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply