Adding additional salutations 2020.10.*
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: 72
- Joined: 22 Mar 2021, 16:56
Adding additional salutations 2020.10.*
Happy new year,
I just wonder if I can get some feedback on managers, sub managers please.
https://github.com/aimeos/aimeos-laravel/issues/198
There was query on github regarding extending a submanager, or rather a submanagers item. I understand the need to extend the Manager, and then create the new Item from the Manager due abstract classes etc etc
This works for Managers, but doesn't appear to be working for submanagers.
eg. does not nothing, its not loaded. I can use any name here and it will not register, or throw exception due to class not existing.
My problem is Aimeos gives the user ability to manage salutations, but only those that exist already within the class \Aimeos\MShop\Common\Item\Address\Base. ie only removal, not additions.
I can see this has changed between 2020.10.* => 2021.10.*, we are however restricted to 2020.10.*.
My salutations are defined as follows where 'ms' is an addition.
The `checkSalutation` method on the item address base validates that the value given, defined on the config, exists within the range of salutations defined in the class - which is now obviously throwing a validation exception. This had led down the path to overwrite this method in the class to allow it to validate on those defined in the configuration - which is where I am stuck, as the behavior isn't acting as described in the docs.
No doubt im missing something there, but ive gone over the docs and tried many things, but my class is never loaded.
The following https://aimeos.org/docs/2020.x/infrastr ... /#managers describes "mshop/<domain>/manager/<submanager>/<submanager>/name", im definitely doing this.
I also found something related here viewtopic.php?f=18&t=3250&p=12975&hilit ... ess#p12975, however the response wasn't really answering the OPs question.
I came across this thread viewtopic.php?f=18&t=3235&p=12921&hilit ... ess#p12921 which explains
Im hoping there is something obvious I am missing or doing incorrectly?
Thanks
I just wonder if I can get some feedback on managers, sub managers please.
https://github.com/aimeos/aimeos-laravel/issues/198
There was query on github regarding extending a submanager, or rather a submanagers item. I understand the need to extend the Manager, and then create the new Item from the Manager due abstract classes etc etc
This works for Managers, but doesn't appear to be working for submanagers.
eg.
Code: Select all
mshop/customer/manager/address/name = CustomerAddressManager
My problem is Aimeos gives the user ability to manage salutations, but only those that exist already within the class \Aimeos\MShop\Common\Item\Address\Base. ie only removal, not additions.
I can see this has changed between 2020.10.* => 2021.10.*, we are however restricted to 2020.10.*.
My salutations are defined as follows where 'ms' is an addition.
Code: Select all
['company', 'mr', 'mrs', 'ms', 'miss']
Code: Select all
mshop/customer/manager/address/name => CustomerAddressManager
The following https://aimeos.org/docs/2020.x/infrastr ... /#managers describes "mshop/<domain>/manager/<submanager>/<submanager>/name", im definitely doing this.
I also found something related here viewtopic.php?f=18&t=3250&p=12975&hilit ... ess#p12975, however the response wasn't really answering the OPs question.
I came across this thread viewtopic.php?f=18&t=3235&p=12921&hilit ... ess#p12921 which explains
This is what I believe I am trying to do.You can either increase the number of options by extending several places in the code...
Im hoping there is something obvious I am missing or doing incorrectly?
Thanks
Re: Adding additional salutations 2020.10.*
Can you post the exact configuration you have been added for your new submanager?
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: 72
- Joined: 22 Mar 2021, 16:56
Re: Adding additional salutations 2020.10.*
Code: Select all
return [
...
'customer' => [
'manager' => [
'address' => [
'name' => 'CustomerAddressManager'
],
],
],
]
Code: Select all
\Aimeos\MShop\Customer\Manager\Address\CustomerAddressManager
https://github.com/aimeos/aimeos-core/b ... #L327-L337
It's probably something I might be missing from its parent customer manager configuration that isn't quite clear through documentation? It's just my understanding from the website is that submanagers are created no differently to managers.
Thanks
Re: Adding additional salutations 2020.10.*
Do you use Laravel? If yes, did you add the configuration to the ./config/shop.php file?
If you've added it to a config file in your own extension, it may get overwritten by the Laravel configuration which uses a custom customer manager.
If you've added it to a config file in your own extension, it may get overwritten by the Laravel configuration which uses a custom customer manager.
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: 72
- Joined: 22 Mar 2021, 16:56
Re: Adding additional salutations 2020.10.*
Yes I do! And no, the configuration is defined in my extensions /ext/xxxxx/config/mshop.php file.
This sounds what it might be doing, moving forward is the suggestion to configure this then under the "mshop" key within the laravel shop configuration? I'm not able to test this right now, but I will look into this shortly. Thank you
This sounds what it might be doing, moving forward is the suggestion to configure this then under the "mshop" key within the laravel shop configuration? I'm not able to test this right now, but I will look into this shortly. Thank you