Add page to JQAdmin

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!
qvotaxon
Posts: 10
Joined: 21 Dec 2017, 18:11

Add page to JQAdmin

Post by qvotaxon » 21 Dec 2017, 18:28

First of all I want to congratulate you on this awesome project. I am really enjoying all the functionalities and want to compliment you on the professional implementation.

The question I have is:

I just added a contact page to the frontend. This page enables customers to contact the shop owner and thus displays the contact details. Also it contains a contact form.

I want to introduce a functionality that will enable the shop owner to enter his/her contact details (e-mail, phone number etc.) and then show these details on the contact page. I tried adding a page to the jqadmin backend, but haven't been able to do this. Do you have any pointer on how to go about adding a new page to the jqadmin?

What I have tried:

Adding the admin.php to my config directory and adding a new line ('contact') to the jqadm/navbar array item. Also I copied ext/ai-admin-jqadm/admin/jqadm/src/Admin/JQAdm/Plugin folder to ext/xenoshop/admin/jqadm/src/Admin, where xenoshop is my extension name. Following this, I replaced all occurrences of Plugin and plugin with Contact and contact. I am probably doing this totally wrong or I have forgotten something, because nothing happens, not even an error. Could you please point me in the right direction? I couldn't find anything about this on the forum or on https://aimeos.org/docs/Laravel.

Thanks in advance!

System/installation details:

- Aimeos 2017.10.3
- Laravel 5.5.*
- PHP 7.1
- Linux (Ubuntu 16.04.1)
<3 Aimeos

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

Re: Add page to JQAdmin

Post by aimeos » 21 Dec 2017, 21:34

qvotaxon wrote:First of all I want to congratulate you on this awesome project. I am really enjoying all the functionalities and want to compliment you on the professional implementation.
Thank you very much! We appreciate if you love the project as much as we do :-)
qvotaxon wrote:I want to introduce a functionality that will enable the shop owner to enter his/her contact details (e-mail, phone number etc.) and then show these details on the contact page. I tried adding a page to the jqadmin backend, but haven't been able to do this. Do you have any pointer on how to go about adding a new page to the jqadmin?
There's no documentation for extending the JQAdm interface yet because it's still work in progress. We hope to be able to write an article in the next weeks.
qvotaxon wrote:Adding the admin.php to my config directory and adding a new line ('contact') to the jqadm/navbar array item. Also I copied ext/ai-admin-jqadm/admin/jqadm/src/Admin/JQAdm/Plugin folder to ext/xenoshop/admin/jqadm/src/Admin, where xenoshop is my extension name. Following this, I replaced all occurrences of Plugin and plugin with Contact and contact. I am probably doing this totally wrong or I have forgotten something, because nothing happens, not even an error. Could you please point me in the right direction? I couldn't find anything about this on the forum or on https://aimeos.org/docs/Laravel.
Maybe it's just a minor thing. Did you also add the allowed groups in the resources section?
https://github.com/aimeos/ai-admin-jqad ... in.php#L44
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

qvotaxon
Posts: 10
Joined: 21 Dec 2017, 18:11

Re: Add page to JQAdmin

Post by qvotaxon » 22 Dec 2017, 08:25

Many thanks for the quick response.

I just checked your solution and it seems to work :D ! Although to me it seems as if I'm still doing something wrong. For most of the Aimeos project I can just create a config file in the config directory in the root of my project. This file will then override the core file. But when I try to do this, my custom config file is not read. It does work however if I choose to edit the jqadmin/config/admin.php file in the ai-admin-jqadm extension directory. To me this seems a bit risky, since updating this extension would probably overwrite my adjustments.

My class files (in my case JQAdm/Contact/Factory.php and JQAdm/Contact/Standard.php do work when I place these in my extension directory. Is this config 'issue' something that simply isn't implemented yet? Or am I doing something wrong.
<3 Aimeos

qvotaxon
Posts: 10
Joined: 21 Dec 2017, 18:11

Re: Add page to JQAdmin

Post by qvotaxon » 22 Dec 2017, 09:02

I read some more posts on the forum and with some luck I found the solution. Probably should have read the docs better :shock: . I added my admin.php config file to the ext/xenoshop/lib/custom/config directory, and now everything works perfectly.

Thanks anyway!
<3 Aimeos

Post Reply