How to add Options/Statistics item to shop admin and not just superuser?

22.11.2020 11:09
#1
Philippe91
Joomshopping forum user no avatar
Name: Philippe
03.10.2020
Сообщения: 41
Quote
How to add Options/Statistics item to shop admin and not just superuser?

Hello,

I would lik that the shop admin (who is not me) be able to see the Options/Statistics icon in Options.
I've looked at file administrator/components/com_jshopping/functions.php and at function displayOptionPanelIco()
It displays statistics icon if : $adminaccess && !$jshopConfig->disable_admin['statistic']

Where do I confgure the shop admin so that this works? He is defined in com_users as Admin and Registered.
I don't see anything relative to shop admin other than his email address

Thanks


Joomla: 3.9.22
JoomShopping: 4.18.4
 
22.11.2020 17:33
#2
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Сообщения: 25934
Quote
Aw: How to add Options/Statistics item to shop admin and not just superuser?

$menu['statistic'] = array(_JSHOP_STATISTIC, 'index.php?option=com_jshopping&controller=statistic', 'jshop_order_status_b.png', $adminaccess && !$jshopConfig->disable_admin['statistic']);

change to

$menu['statistic'] = array(_JSHOP_STATISTIC, 'index.php?option=com_jshopping&controller=statistic', 'jshop_order_status_b.png', !$jshopConfig->disable_admin['statistic']);

 
23.11.2020 09:54
#3
Philippe91
Joomshopping forum user no avatar
Name: Philippe
03.10.2020
Сообщения: 41
Quote
Aw: How to add Options/Statistics item to shop admin and not just superuser?

Hello,
Thanks for the suggestion. That's what I first tried before posting. However this displays the icon in the joomshopping panel but does not allow the use of the statistic function: I get a "You are not allowed to use this resource" message.
It seems to me that this is only allowed to superusers and not Administrators. Any idea where this access is defined?
Thanks much
Philippe

 
23.11.2020 10:37
#4
Philippe91
Joomshopping forum user no avatar
Name: Philippe
03.10.2020
Сообщения: 41
Quote
Aw: How to add Options/Statistics item to shop admin and not just superuser?

Found a way to do it by changing:

$access["statistic"] = $user->authorise('core.admin', 'com_jshopping')==1;
to
$access["statistic"] = $user->authorise('core.manage', 'com_jshopping')==1;

This will do it for now since no other admin or superuser is created who can access the backend, but is this the only way to do it?

Cheers

Philippe

 


Copyrights MAXXmarketing GmbH. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.