Add new customer address field in JQAdm backend - Decorator
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Add new customer address field in JQAdm backend - Decorator
Hi,
I'd like to add in the Aimeos JQAdm/ admin-backen a new field to Customer > Address:
already added the field in:
\ext\ai-admin-jqadm\admin\jqadm\templates\customer\item-address-standard.php
created a decorator:
\ext\<my-extension>\lib\custom\src\MShop\Customer\Manager\Address\Decorator
and updated shop.php:
but this causes Error "Class "\Aimeos\Admin\JQAdm\Customer\Address\Decorator\Myproject" not found", and when using:
nothing happens, neither an error message nor an DB-entry
What I'm doing wrong? What's missing?
Thanks
I'd like to add in the Aimeos JQAdm/ admin-backen a new field to Customer > Address:
already added the field in:
\ext\ai-admin-jqadm\admin\jqadm\templates\customer\item-address-standard.php
created a decorator:
\ext\<my-extension>\lib\custom\src\MShop\Customer\Manager\Address\Decorator
Code: Select all
<?php
namespace Aimeos\MShop\Customer\Manager\Address\Decorator;
class Myproject extends \Aimeos\MShop\Common\Manager\Decorator\Base
{
private $attr = [
'mycolumn' => [
'code' => 'mycolumn',
'internalcode' => 'lvuad."mycolumn"',
'label' => 'My new column',
'type' => 'string',
'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
],
];
public function getSaveAttributes() : array
{
return parent::getSaveAttributes() + $this->createAttributes( $this->attr );
}
public function getSearchAttributes( bool $sub = true ) : array
{
return parent::getSearchAttributes( $sub ) + $this->createAttributes( $this->attr );
}
}
Code: Select all
'admin' => [
'jqadm' => [
'customer' => [
'address' => [
'decorators' => [
'local' => ['Myproject']
]
]
]
]
...
]
but this causes Error "Class "\Aimeos\Admin\JQAdm\Customer\Address\Decorator\Myproject" not found", and when using:
Code: Select all
'mshop' => [
'customer' => [
'address' => [
'decorators' => [
'local' => ['Myproject']
]
]
]
]
What I'm doing wrong? What's missing?
Thanks
Last edited by columbo on 20 Jun 2021, 13:37, edited 4 times in total.
Re: Add new customer address field in JQAdm backend - Decorator
The correct configuration in your case is: https://aimeos.org/docs/2021.x/config/m ... atorslocal
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Add new customer address field in JQAdm backend - Decorator
thanks - now its working fine.