store data in site table
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!
store data in site table
Hi,
i am a laravel developer and using laravel8.i have integrated aimeos in laravel successfully.i was given a task to add another
field in site form which i achieved successfully by adding a field in front end
also i added a field named city in mshop_locale_site(table) by adding a locale.php file in directory
ext\ai-moudhah\lib\custom\setup\default\schema
and that file contains following code
and that was done successfully.now in order to store data in the table i made a decorator Myproject.php in the directory
ext\ai-moudhah\lib\custom\src\MShop\Locale\Manager\Site\Decorator
and that file contains following code
but when i hit save button the value of city field does not stores.please guide me what i am doing wrong and i need quick
response because i am in real time project.thanks
i am a laravel developer and using laravel8.i have integrated aimeos in laravel successfully.i was given a task to add another
field in site form which i achieved successfully by adding a field in front end
also i added a field named city in mshop_locale_site(table) by adding a locale.php file in directory
ext\ai-moudhah\lib\custom\setup\default\schema
and that file contains following code
Code: Select all
return [
'table' => [
'mshop_locale_site' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
$table = $schema->getTable( 'mshop_locale_site' );
$table->addColumn( 'city', 'string', ['length' => 255] );
return $schema;
}
]
];
ext\ai-moudhah\lib\custom\src\MShop\Locale\Manager\Site\Decorator
and that file contains following code
Code: Select all
namespace Aimeos\MShop\Locale\Manager\Site\Decorator;
class Myproject extends \Aimeos\MShop\Common\Manager\Decorator\Base
{
private $attr = [
'city' => [
'code' => 'city',
'internalcode' => 'city',
'label' => 'My new column',
'type' => 'string',
'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_STR,
],
];
public function getSaveAttributes()
{
return $this->createAttributes( $this->attr );
return parent::getSaveAttributes() + $this->createAttributes( $this->attr );
}
public function getSearchAttributes( $sub = true )
{
return parent::getSearchAttributes( $sub ) + $this->createAttributes( $this->attr );
}
}
response because i am in real time project.thanks
Re: store data in site table
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