Supplier Address Decorator Not Working

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!
User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: Supplier Address Decorator Not Working

Post by aimeos » 26 Apr 2022, 07:48

rahulhhh wrote: 25 Apr 2022, 04:39 I have created a supplier decorator in ext->liv->custom->src->mshop->supplier->manager->decorator->supplierdecorator
The correct directory is "ext/<yourextensionname>/lib/custom/src/MShop/Supplier/Manager/Decorator/SupplierDecorator.php"
rahulhhh wrote: 25 Apr 2022, 04:39 same way i have created supplier address decorator in ext->liv->custom->src->mshop->supplier->manager->address->supplieraddressdecorator for adding fields in supplier address table and configured it in mshop in following way.

return [
'supplier' => [
'manager' => [
'address' => [
'local' => ['SupplierAddressDecorator']
]
]
]
];

this is not working. not fetching the data from new fields and not saving data as well. i have added decorator files below.
Your configuration is wrong and must be:

Code: Select all

return [
   'supplier' => [
        'manager' => [
            'decorators' => [
                'local' => ['SupplierDecorator']
            ],
            'address' => [
                'decorators' => [
                    'local' => ['SupplierAddressDecorator']
                ]
            ]
        ]
    ]
];
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

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

Re: Supplier Address Decorator Not Working

Post by aimeos » 28 Apr 2022, 05:35

Your code looks OK. Check in getSaveAttributes() if your decorator is called at all.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

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

Re: Supplier Address Decorator Not Working

Post by aimeos » 29 Apr 2022, 06:22

Most likely, your configuration is still not correct.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply