Add new field to customer 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: 44
- Joined: 05 Feb 2018, 09:57
Add new field to customer table
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.
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.
Re: Add new field to customer table
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.
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.
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: 44
- Joined: 05 Feb 2018, 09:57
Re: Add new field to customer table
Yes, I can try. Where should I start? What do you suggest?
Re: Add new field to customer table
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)
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)
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