How to configure and adapt Aimeos based shops as developer
Forum rules: Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#6058 by michal.fehér
19 Apr 2018, 15:06
Hi, I am trying to add new field to customer (users - I am using laravel) table - Chamber of Commerce number (COC) alongside with existing VAT ID.

I read this forum and there are several topics regarding this, most of them are suggesting extending managers and items, which I find as an overkill for such a common thing (and I am also getting "AccessDeniedHttpException").

You also mentioned this can be done by "reference attribute items via the list table".
Can you please give me more information what does it mean exactly?

Thank you.
#6061 by aimeos
20 Apr 2018, 09:01
You can use the customer/lists manager to store references to items of other domains, e.g. to attribute items. Attributes can be shared between multiple items but this isn't the case here because your value is specific to for the customer item.

The cleaner approach would be to create add a users_property and users_property_type table using the existing common property and type managers but that doesn't exist yet. If you want to help, we can add that together to the core.
#6067 by aimeos
21 Apr 2018, 12:07
Great! :-)

Here are the first steps:
- Add the new property and property type table to the customer schema file
- Create a new customer property and customer property type managers using the common property and common type manager (use the product domain as reference)
- Add the SQL statements for the customer property manager (copy and adapt product property manager SQL)
- Add getPropertyItems() to the customer item and add the necessary code in customer manager searchItems() (also use product manager as reference)