Custom data domain for Aimeos 20216
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Custom data domain for Aimeos 20216
I was wondering if its possible create my own data domain. As a result I would be able to create my custom associate item for that domain and have access to in the expert mode of my admin.
-Thanks
-Thanks
Re: Custom data domain
Sure! The first step is to create the new data domain itself.
After you've created your own Aimeos extension (https://aimeos.org/developer/extensions/), you should set up the tables you need. Each table needs some default columns:
- id
- siteid
- ctime
- mtime
- editor
The tables can be automatically created during the setup phase if you create a setup task:
https://aimeos.org/docs/Developers/Library/Setup_tasks
The easiest way is to let Doctrine DBAL do the work. Then, it will also work with other database servers. Take the setup task in the ai-laravel extension as reference:
- https://github.com/aimeos/ai-laravel/bl ... aravel.php
- https://github.com/aimeos/ai-laravel/bl ... stomer.php
If you implemented that part and the tables are created when running aimeos:setup, we can continue to with the necessary item and manager.
After you've created your own Aimeos extension (https://aimeos.org/developer/extensions/), you should set up the tables you need. Each table needs some default columns:
- id
- siteid
- ctime
- mtime
- editor
The tables can be automatically created during the setup phase if you create a setup task:
https://aimeos.org/docs/Developers/Library/Setup_tasks
The easiest way is to let Doctrine DBAL do the work. Then, it will also work with other database servers. Take the setup task in the ai-laravel extension as reference:
- https://github.com/aimeos/ai-laravel/bl ... aravel.php
- https://github.com/aimeos/ai-laravel/bl ... stomer.php
If you implemented that part and the tables are created when running aimeos:setup, we can continue to with the necessary item and manager.
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
Re: Custom data domain
The other question I have, is how you I add my own custom tab in the panel of expert data domain. This tab will linked to information that I have within the database.
- Attachments
-
- Expert Mode.JPG (95.09 KiB) Viewed 5220 times
Re: Custom data domain
You need to create the item/manager/controller first before you can add a tab for the new data domain.
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
Re: Custom data domain
Is this the right directory for the controller ; ext\ai-admin-extadm\controller\extjs\src\Controller ?
Re: Custom data domain
Yes, there are the ExtJS controllers of the core. The same structure exists in your own extension for the project and there you can store your own controllers.
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
Re: Custom data domain
I have made the item + Manager classes and made the extjs controller. What is the next step?
Re: Custom data domain
You need the code for the list and item UI as well as the item picker. Have a look at the tags implementation:
https://github.com/aimeos/ai-admin-exta ... /panel/tag
Afterwards, you also need the item pickers for the domains you want your items to associate to, e.g. for the product domain:
https://github.com/aimeos/ai-admin-exta ... ickerUi.js
https://github.com/aimeos/ai-admin-exta ... /panel/tag
Afterwards, you also need the item pickers for the domains you want your items to associate to, e.g. for the product domain:
https://github.com/aimeos/ai-admin-exta ... ickerUi.js
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
Re: Custom data domain
I also did that. But the tab still hasn't appeared.
Re: Custom data domain
The last step is to add your new files to the manifest.jsb2 of your own extension like in the core:
https://github.com/aimeos/ai-admin-exta ... ifest.jsb2
https://github.com/aimeos/ai-admin-exta ... ifest.jsb2
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