How to extend a mshop_order_base table
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!
- IvanIgniter
- Posts: 58
- Joined: 01 Dec 2021, 07:41
How to extend a mshop_order_base table
I am using laravel 6.x, PHP 7.4, Docker desktop/Ubuntu and the Aimeos 2021 (aimeos-laravel: 2021.10.4 / aimeos-core: 2021.10.13)
I have implemented different decorators like customers, product, orders but this time I want to create a decorator for sub-item for mshop_order_base table. From the documentation I can't find any examples. Kindly help me how to implement it or give me a link.
Thank you
I have implemented different decorators like customers, product, orders but this time I want to create a decorator for sub-item for mshop_order_base table. From the documentation I can't find any examples. Kindly help me how to implement it or give me a link.
Thank you
Re: How to extend a mshop_order_base table
It's the same like for the domain managers, only the configuration contains the type of the sub-manager:
https://github.com/aimeos/aimeos-core/b ... p#L78-L105
https://github.com/aimeos/aimeos-core/b ... p#L78-L105
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
- IvanIgniter
- Posts: 58
- Joined: 01 Dec 2021, 07:41
Re: How to extend a mshop_order_base table
I am not sure what you mean only the configuration contains the type of the sub-manager and based on the link.
This how I understand and did it but after php artisan aimeos:setup. No additional field was added in mshop_order_base table.
Please guide how it is done to make it right.
I also tried this way And this and moved the Myproject.php file to
ext\ai-admin-jqadm\lib\custom\src\MShop\Order\Manager\Base\Decorator\Myproject.php
This how I understand and did it but after php artisan aimeos:setup. No additional field was added in mshop_order_base table.
Please guide how it is done to make it right.
I also tried this way And this and moved the Myproject.php file to
ext\ai-admin-jqadm\lib\custom\src\MShop\Order\Manager\Base\Decorator\Myproject.php
- IvanIgniter
- Posts: 58
- Joined: 01 Dec 2021, 07:41
Re: How to extend a mshop_order_base table
Waiting for a respond.. Please help what is the solution?
- IvanIgniter
- Posts: 58
- Joined: 01 Dec 2021, 07:41
Re: How to extend a mshop_order_base table
Could anybody help or suggest what to do if they encounter the same issue?
- IvanIgniter
- Posts: 58
- Joined: 01 Dec 2021, 07:41
Re: How to extend a mshop_order_base table
I have figured it out how to add the new columns to mshop_order_base but I couldn't display those added new fields.
Please advise what is the correct configuration to show it in aimeos admin order list page.
Please advise what is the correct configuration to show it in aimeos admin order list page.
Re: How to extend a mshop_order_base table
Your schema file is now correct (order.php) but your decorator configuration must be:
See: https://aimeos.org/docs/2022.x/config/m ... atorslocal
Code: Select all
'mshop' => [
'order' => [
'manager' => [
'base' => [
'decorators' => [
'local' => [
'MyProject'
]
]
]
]
]
]
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
- IvanIgniter
- Posts: 58
- Joined: 01 Dec 2021, 07:41
Re: How to extend a mshop_order_base table
Thank you..
'order' => [
'manager' => [
'base' => [
'decorators' => [
'local' => [
'Myproject'
]
]
],
'decorators' => [
'local' => ['Myproject']
]
]
]
Works for me.
The second mistake was the Decorator/Myproject should be mordba.fieldname not mordbase.fieldname
'order' => [
'manager' => [
'base' => [
'decorators' => [
'local' => [
'Myproject'
]
]
],
'decorators' => [
'local' => ['Myproject']
]
]
]
Works for me.
The second mistake was the Decorator/Myproject should be mordba.fieldname not mordbase.fieldname
- IvanIgniter
- Posts: 58
- Joined: 01 Dec 2021, 07:41
Re: How to extend a mshop_order_base table
Can I have a last one more question using a decorator.
I was able to display now what records are stored in the db but storing into that extra fields along with existing fields is not working.
Why is the comment field was the only one stored in the db and the new field last_name did not?
I was tracing the whole codes as will as the aimeos core to make it right but I can't figure it out.
I was able to display now what records are stored in the db but storing into that extra fields along with existing fields is not working.
Why is the comment field was the only one stored in the db and the new field last_name did not?
I was tracing the whole codes as will as the aimeos core to make it right but I can't figure it out.
- Attachments
-
- 4a.jpg (90.38 KiB) Viewed 1682 times
-
- 4.jpg (156.23 KiB) Viewed 1682 times
Re: How to extend a mshop_order_base table
You must hand over "last_name", not "order.base.last_name". The key is exactly the same as you use in your decorator.
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