Page 1 of 1
Hide Dashboard info
Posted: Wed May 25, 2011 10:58 pm
by leacjv
Hi,
Using opencart and have created user accounts for suppliers so that they can manually go on and change order details when order in process, shpped etc...
While I can specify what they can access the dashboard tells them an overview of sales etc and statistics which I do not want them to be able to see is there a way to hide the dashbaord from users accept the main admin user?
Re: Hide Dashboard info
Posted: Wed May 25, 2011 11:05 pm
by ckonig
if you use the attached vQmod, you can set the dashboard permissions for each usergroup. per default, this mod forwards the user to the orders page, if you want it somewhere else, you will have to change the line
Code: Select all
if(!$this->user->hasPermission('access','common/home')){
$this->redirect('index.php?token='.$token.'&route=sale/order');
}
to something else, so if you want to forward to the products page, change it to
Code: Select all
if(!$this->user->hasPermission('access','common/home')){
$this->redirect('index.php?token='.$token.'&route=catalog/product');
}
Re: Hide Dashboard info
Posted: Wed May 25, 2011 11:56 pm
by leacjv
thank you for your help,
I a really new to this i understand how you have changed the code but what do I do with the file once I have downloaded it - my computer wants to open it using dreamweaver!
Re: Hide Dashboard info
Posted: Thu May 26, 2011 4:06 am
by webpie it.
Install vqmod
Make sure read the readme.txt!
http://forum.opencart.com/viewtopic.php?f=23&t=24529
Ckonig this an awesome mod, hadn't asked but was looking for something just like this, thanks buddy

Re: Hide Dashboard info
Posted: Thu May 26, 2011 6:18 pm
by ckonig
you're welcome

Re: Hide Dashboard info
Posted: Sat May 28, 2011 2:56 am
by leacjv
thanks alot

Re: Hide Dashboard info
Posted: Sat May 28, 2011 4:32 pm
by webpie it.
also worth noting, as i had changed the admin path, i changed this part of the xml too:
Code: Select all
<file name="admin/controller/user/user_permission.php">
Code: Select all
<file name="admin/view/template/common/home.tpl">
In two places
mine looked like:
Code: Select all
<file name="myadminpath/controller/user/user_permission.php">
Code: Select all
<file name="myadminpath/view/template/common/home.tpl">
Really minor but i think worth mentioning, just for anyone wondering, i scrtached my ehad for like 5 seconds on this before i knew why the path was incorrect!

Re: Hide Dashboard info
Posted: Mon May 30, 2011 6:18 pm
by leacjv
thanks alot your 5 secs wud of taken me hours
Re: Hide Dashboard info
Posted: Mon May 30, 2011 6:36 pm
by webpie it.
Glad it helped
Re: Hide Dashboard info
Posted: Tue May 31, 2011 9:16 pm
by leacjv
Hi
I have downloaded vqmod and followed the instructions which where pretty straightforward and have hopefully installed vqmod!
The bit im stuck at is I have downloaded the above script but I am unsure how to install it?? the instructions I have that are general from vqmod say;
GENERAL USAGE:
==========
Check the \core_scripts\ folder for any specific install instructions for your platform that may already exist.
These are general usage steps for adding to your own project that doesn't have existing install steps.
1. Include the VirtualQmod class in your index file, before all other require or include commands.
2. Create a new class object called $vqmod.
Example:
//vQmod
require_once('./vqmod/vqmod.php');
$vqmod = new VQMod('./vqmod/vqmod');
3. For all places that an include/require is called, wrap the inner file with a the modCheck function
Ex.
require_once('system/startup.php');
changes to:
require_once($vqmod->modCheck('system/startup.php'));
4. Drop a mod file into the /vqmod/xml/ folder and thats it! Reload your site and see it work
- If a mod is not taking effect, it is likely that there was an error and it just defaulted to the original source. Check the "vqmod.log" file for errors.
- All temp modified files are created in the /vqmod/vqcache/ directory. You can see exactly what changes were made on the fly.
- To remove a mod, just delete it from the /vqmod/xml/ folder or rename the extension .xml to .xml_
But I do not understand the above if that is how to install the vqmod script i want??? Can anyone help??
Thanks
Re: Hide Dashboard info
Posted: Tue May 31, 2011 9:20 pm
by webpie it.
I did write this above, the mod uses vqmod which you must install, please read right the way through the topic.