Implement own data domain
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!
-
- Expert
- Posts: 274
- Joined: 27 Jun 2019, 16:19
Implement own data domain
Hi my friends,
My environment is the following:
Laravel Framework 5.8.26
aimeos-laravel 2019.07
PHP Version 7.2.19-1+ubuntu18.04.1+deb.sury.org+1
I have red this topic Re: Custom data domain but seems it is for old versions.
For now I have the following modifications:
/var/www/schmuck/ext/labor/lib/custom/setup/default/schema/product.php :
To the navbar config I have added:
From original aimeos extension I have copied this /var/www/schmuck/ext/labor/admin/jqadm/src/Product to my custom extension. Also in Product folder I created Group folder with Standard inside. But in admin panel I got only Product->Products, but I expect to get Product-> (Products, Groups)
I guess I need to add manager for new domain and maybe something else. Help me please what else I need ?
Thanks a lot!
My environment is the following:
Laravel Framework 5.8.26
aimeos-laravel 2019.07
PHP Version 7.2.19-1+ubuntu18.04.1+deb.sury.org+1
I have red this topic Re: Custom data domain but seems it is for old versions.
For now I have the following modifications:
/var/www/schmuck/ext/labor/lib/custom/setup/default/schema/product.php :
Code: Select all
return array(
'table' => array(
'mshop_product_group' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
$table = $schema->createTable( 'mshop_product_group' );
$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
$table->addColumn( 'siteid', 'integer', array( 'notnull' => false ) );
$table->addColumn( 'code', 'string', array( 'length' => 32 ) );
$table->addColumn( 'label', 'string', array( 'length' => 255 ) );
$table->addColumn( 'mtime', 'datetime', [] );
$table->addColumn( 'ctime', 'datetime', [] );
$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
$table->setPrimaryKey( array( 'id' ), 'pk_msprodgr_id' );
$table->addUniqueIndex( array( 'siteid', 'code' ), 'unq_msprodgr_sid_code' );
$table->addIndex( array( 'siteid', 'label' ), 'idx_msprodgr_sid_label' );
return $schema;
},
),
);
Code: Select all
'product' => [
'product',
'product/group'
],
I guess I need to add manager for new domain and maybe something else. Help me please what else I need ?
Thanks a lot!
Re: Implement own data domain
If you need to link products to customer groups, the easiest way is the ai-customergroups extension from the Aimeos company: https://aimeos.com/extensions#c437
If you want to group products together in the frontend, you can use an attribute associated to the products instead. Can you explain a bit more in detail what you want to achieve?
The topic you reference is for Aimeos 2016.x and before and not relevant any more for extending the admin interface.
If you want to group products together in the frontend, you can use an attribute associated to the products instead. Can you explain a bit more in detail what you want to achieve?
The topic you reference is for Aimeos 2016.x and before and not relevant any more for extending the admin interface.
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
-
- Expert
- Posts: 274
- Joined: 27 Jun 2019, 16:19
Re: Implement own data domain
Hi, great thank you for the help! I am very glad that I have chosed Aimeos for development. Now I have pretty complicated task:
Each product may belong to several 'Price groups'. And for each belonged group must be different prices. For example:
Product 1 belongs to Group 1 and Group 2. For Product 1-> Group 1 price is 100$, but for Product 1 -> Group 2 the price is 200$.
On the other side, each user will have only one specific price group. so user with Group 1 will see price 100$, but another user with group 2 will see price 200$.
Please give me at least general idea how to implement it better ? Cuz you are guru in Aimeos!
I am very thankful !
Each product may belong to several 'Price groups'. And for each belonged group must be different prices. For example:
Product 1 belongs to Group 1 and Group 2. For Product 1-> Group 1 price is 100$, but for Product 1 -> Group 2 the price is 200$.
On the other side, each user will have only one specific price group. so user with Group 1 will see price 100$, but another user with group 2 will see price 200$.
Please give me at least general idea how to implement it better ? Cuz you are guru in Aimeos!
I am very thankful !
Re: Implement own data domain
The ai-customergroups extension from the Aimeos company does exactly that. They associate customers or customer groups to products (and other items) via the list table and filter the price depending on the logged in user.
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