Page 1 of 1

How to use custom columns/tables

Posted: 16 Oct 2017, 10:42
by roasted-toast
Hello,

I've installed the Aimeos package on top of an existing Laravel 5.4 app and I need to user different column names.
This app uses 2 specific columns names for the user's first and last name:

Code: Select all

first_name
last_name
Aimeos uses different columns:

Code: Select all

firstname
lastname
Accessing the Aimeos backend shows empty fields for the customers page:

Image

Same for phone, we have:

Code: Select all

office_number
mobile_number
When aimeos uses:

Code: Select all

telephone
Another problem is that the address, postal code and city columns are being used on a different table (companies, linked with a companies.user_id column).

What would be the best workaround for me to use the existing records inside the ecommerce package without having to duplicate them into the aimeos fields?

Any advice would be most welcome, thanks.

Re: How to use custom columns/tables

Posted: 16 Oct 2017, 14:44
by aimeos
You can change the SQL statements for retrieving the data or even replace the Laravel implementation of the customer manager to update tables with depending information (address, company, etc.). This thread explains how:
laravel-package-f18/override-ext-ai-laravel-t1135.html