Adding additional salutations 2020.10.*
Posted: 10 Jan 2022, 12:52
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