Custom data domain for Aimeos 20216

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!
chadd25
Posts: 6
Joined: 23 Nov 2016, 16:51

Custom data domain for Aimeos 20216

Post by chadd25 » 24 Nov 2016, 22:06

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

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

Re: Custom data domain

Post by aimeos » 25 Nov 2016, 09:45

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

chadd25
Posts: 6
Joined: 23 Nov 2016, 16:51

Re: Custom data domain

Post by chadd25 » 28 Nov 2016, 21:23

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
Expert Mode.JPG (95.09 KiB) Viewed 4770 times

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

Re: Custom data domain

Post by aimeos » 28 Nov 2016, 22:25

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, Image give us a star

chadd25
Posts: 6
Joined: 23 Nov 2016, 16:51

Re: Custom data domain

Post by chadd25 » 29 Nov 2016, 00:00

Is this the right directory for the controller ; ext\ai-admin-extadm\controller\extjs\src\Controller ?

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

Re: Custom data domain

Post by aimeos » 29 Nov 2016, 09:32

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, Image give us a star

chadd25
Posts: 6
Joined: 23 Nov 2016, 16:51

Re: Custom data domain

Post by chadd25 » 29 Nov 2016, 16:53

I have made the item + Manager classes and made the extjs controller. What is the next step?

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

Re: Custom data domain

Post by aimeos » 29 Nov 2016, 18:49

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

chadd25
Posts: 6
Joined: 23 Nov 2016, 16:51

Re: Custom data domain

Post by chadd25 » 29 Nov 2016, 23:06

I also did that. But the tab still hasn't appeared.

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

Re: Custom data domain

Post by aimeos » 30 Nov 2016, 09:41

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply