Aimeos integration with another Laravel system

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
whatanaka1
Posts: 2
Joined: 24 Jan 2020, 07:50

Aimeos integration with another Laravel system

Post by whatanaka1 » 29 Apr 2020, 08:54

Hello,
I am not fluent in English. I will try to be more clear as a possible in my explanation and in my question.

**EXPLANATION:
I am considering use AIMEOS for a School. This system I will name EC-SITE only for this explanation.
I will develop a system to control that school, I am planning to use Laravel to do it. This system I will name SCHOOL-SYSTEM only for this explanation.
And all the teachers and students of this school will be have a account in SCHOOL-SYSTEM.
The customer needs to enter the same id and password used on
SCHOOL-SYSTEM to access the EC-SITE .
Development and production environment will be Linux, MySql, Nginx, PHP and Docker so, I will choose the proper environment to run AIMEOS without problems.

**QUESTION:
So I want to know if is possible to mantain the customer information of the EC-SITE throught this SCHOOL-SYSTEM. For example, if I register a new student on the SCHOOL-SYSTEM automatically this record will be register in to EC-SITE database. The same must occur to edit and delete actions.
The registrations of the products will be occur by EC-SITE administration site.
Is it possible?

Thank very much

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: Aimeos integration with another Laravel system

Post by aimeos » 29 Apr 2020, 17:32

Easy going, add this to the "resource" section of your ./config/shop.php configuration file:
'db-customer' => array(
'adapter' => 'mysql',
'host' => 'localhost',
'port' => '3306',
'database' => 'my_user_database',
'username' => 'myuser',
'password' => 'secret',
'stmt' => array( "SET SESSION sort_buffer_size=2097144; SET NAMES 'utf8mb4'; SET SESSION sql_mode='ANSI'; SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED" ),
'limit' => 2,
'opt-persistent' => 0
),
Thus, your EC-SITE system will use the users table in the database of SCHOOL-SYSTEM. You need to run the database setup process (php artisan aimeos:setup) afterwards to the users_address, users_list, etc. tables will be created in the SCHOOL-SYSTEM database. That's all :-)

You can find more information about using several database in Aimeos here:
https://aimeos.org/docs/Developers/Several_databases
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply