How to Add Attribute Options of Specific Type With Custom Controller

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
awaidqureshi
Posts: 86
Joined: 12 Jan 2019, 15:17

How to Add Attribute Options of Specific Type With Custom Controller

Post by awaidqureshi » 17 Jul 2019, 07:26

I want to add option of specific attribute type from my custom controller
Please guide about this

Thanks.

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

Re: How to Add Attribute Options of Specific Type With Custom Controller

Post by aimeos » 17 Jul 2019, 08:57

Can you explain by example?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

awaidqureshi
Posts: 86
Joined: 12 Jan 2019, 15:17

Re: How to Add Attribute Options of Specific Type With Custom Controller

Post by awaidqureshi » 17 Jul 2019, 10:12

aimeos wrote: 17 Jul 2019, 08:57 Can you explain by example?
Screenshot_1.png
Screenshot_1.png (34.56 KiB) Viewed 1346 times
I want to Create attribute options of specific type manually from my controller

Screenshot_2.png
Screenshot_2.png (44.87 KiB) Viewed 1346 times

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

Re: How to Add Attribute Options of Specific Type With Custom Controller

Post by aimeos » 17 Jul 2019, 10:19

Use the Aimeos attribute manager to create items automatically in your code:

Code: Select all

$manager = \Aimeos\MShop::create( $context, 'attriubte' );
$item = $manager->createItem()
	->setDomain( 'product' )->setType( 'mytype' )
	->setCode( 'demo-xyz' )->setLabel( 'Demo XYZ' );
$manager->saveItem( $item );
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply