How can we create new manager for newly added 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!
-
- Posts: 10
- Joined: 20 Jun 2023, 07:00
How can we create new manager for newly added table
Aimeos : 2023.04
Windows
PHP : 8.2
Laravel 10
I have added new table in the database, how can I create the manager and include in front end controller?
I have made some changes in config/mshop/customer.php to accomadating new table, included the below in in standard.php
\Aimeos\MShop::create( $this->context(), 'customer/child_buyer' ); gives error says
Invalid component path "customer/child_buyer"
#0 /var/www/html/npkmarket/vendor/aimeos/aimeos-core/src/MShop.php(59): Aimeos\MShop::checkPath().
Please explain how to do this in right way.
@aimeos
Thanks
Windows
PHP : 8.2
Laravel 10
I have added new table in the database, how can I create the manager and include in front end controller?
I have made some changes in config/mshop/customer.php to accomadating new table, included the below in in standard.php
\Aimeos\MShop::create( $this->context(), 'customer/child_buyer' ); gives error says
Invalid component path "customer/child_buyer"
#0 /var/www/html/npkmarket/vendor/aimeos/aimeos-core/src/MShop.php(59): Aimeos\MShop::checkPath().
Please explain how to do this in right way.
@aimeos
Thanks
Re: How can we create new manager for newly added table
How to create a sub-manager is described here:
https://aimeos.org/docs/latest/models/c ... ing-domain
You have to configure it in your ./config/mshop.php using:
https://aimeos.org/docs/latest/models/c ... ing-domain
You have to configure it in your ./config/mshop.php using:
Code: Select all
'customer' => [
'manager' => [
'submanagers' => [
'address' => 'address',
'child_buyer' => 'child_buyer',
'lists' => 'lists',
'property' => 'property',
]
]
],
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
-
- Posts: 10
- Joined: 20 Jun 2023, 07:00
Re: How can we create new manager for newly added table
Thanks for your reply.
After adding the child_buyer in the above config we got
Class "\Aimeos\MShop\Customer\Manager\Childbuyer\Laravel" not found.
As per the doc https://aimeos.org/docs/latest/models/c ... ing-domain
i have create a new file in <ext>/src/MShop/Product/Manager/ChildBuyer/Standard.php
please explain
After adding the child_buyer in the above config we got
Class "\Aimeos\MShop\Customer\Manager\Childbuyer\Laravel" not found.
As per the doc https://aimeos.org/docs/latest/models/c ... ing-domain
i have create a new file in <ext>/src/MShop/Product/Manager/ChildBuyer/Standard.php
please explain
-
- Posts: 10
- Joined: 20 Jun 2023, 07:00
Re: How can we create new manager for newly added table
Once done the composer update, it shows
Class "\Aimeos\MShop\Customer\Manager\Childbuyer\Laravel" does not implement "\Aimeos\MShop\Customer\Manager\Childbuyer\Iface"
Class "\Aimeos\MShop\Customer\Manager\Childbuyer\Laravel" does not implement "\Aimeos\MShop\Customer\Manager\Childbuyer\Iface"
Re: How can we create new manager for newly added table
Store your manager in <ext>/src/MShop/Product/Manager/ChildBuyer/Laravel.php and name your class "Laravel" instead of "Standard". Your class definition should look like:
Code: Select all
namespace Aimeos\MShop\Customer\Manager\ChildBuyer;
class Laravel
extends \Aimeos\MShop\Common\Manager\Base
implements \Aimeos\MShop\Common\Manager\Iface
{
// ...
}
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