language form-add new field
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!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Re: language form-add new field
i have tried that but when i extend from sites these methods in manager do not workaimeos wrote: ↑30 Jan 2021, 10:31 Don't extend from the Standard locale site manager class if you are using the ai-sites extension:Instead, extend from the "Sites" class of that extension:Code: Select all
class Myproject extends Standard
Code: Select all
class Myproject extends Sites
Code: Select all
public function getSearchAttributes( bool $withsub = true ) : array
{
$list = parent::getSearchAttributes( $withsub );
foreach( $this->searchConfig as $key => $fields ) {
$list[$key] = new \Aimeos\MW\Criteria\Attribute\Standard( $fields );
}
return $list;
}
protected function createItemBase( array $data = [] ) : \Aimeos\MShop\Locale\Item\Site\Iface
{
return new \Aimeos\MShop\Locale\Item\Site\Myproject( $data );
}
Re: language form-add new field
hey aimeos,aimeos wrote: ↑30 Jan 2021, 10:31 Don't extend from the Standard locale site manager class if you are using the ai-sites extension:Instead, extend from the "Sites" class of that extension:Code: Select all
class Myproject extends Standard
Code: Select all
class Myproject extends Sites
actually i have extended my manager from Sites class but method
Code: Select all
protected function createItemBase( array $data = [] ) : \Aimeos\MShop\Locale\Item\Site\Iface
{
return new \Aimeos\MShop\Locale\Item\Site\Myproject( $data );
}
Re: language form-add new field
please guide me which method should i use instead of createItemBase when extending from Sites class because it is not
working as you know it is a protected method from Standard Class
working as you know it is a protected method from Standard Class
Re: language form-add new field
hey aimeos can please have a look on that problem
Re: language form-add new field
If you haven't added a \Aimeos\MShop\Locale\Item\Site\Myproject class yet, you should do that like described in the docs:
https://aimeos.org/docs/latest/infrastr ... ers/#items
https://aimeos.org/docs/latest/infrastr ... ers/#items
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