Author Archives: admin

Admin Profiles “Sorry, your security clearance does not allow you to access this resource”

Recently installed Admin Profiles module on a 1.3.9h zen cart shopping cart. Upon installation I follow this set of instuctions to manage user permission:

  1. Log in to admin (if it is your first time in, you will need to be the user with admin_id = 1).
  2. Go to Admin > Tools > Admin Settings
  3. Click on Permissions icon (white p in an orange circle) for the user whose permissions you want to edit. There are two levels of control, menu headers (e.g. configuration, catalog, modules, and individual pages).

On step 3, I kept getting this error message – “Sorry, your security clearance does not allow you to access this resource“.  After several internet search a link (http://www.zen-cart.com/wiki/index.php/Contribution:Admin_Profiles).

To fix this problem, open init_admin_auth.php located in admin folder ”admin folder name” >> includes >> init_includes >>overrides. Look for this body of code and change body of code from


if (!(basename($PHP_SELF) == FILENAME_LOGIN . ".php"))
{
 $page = basename($PHP_SELF, ".php");
 if (!in_array($page, array(FILENAME_DEFAULT,FILENAME_PRODUCT,FILENAME_LOGOFF,FILENAME_ALT_NAV,FILENAME_PASSWORD_FORGOTTEN,FILENAME_DENIED)))
 {
 if (check_page($page) == FALSE)
 {
 header("location: ".FILENAME_DENIED.".php");
 }
 }
 if (!isset($_SESSION['admin_id']))
 {
 if (!(basename($PHP_SELF) == FILENAME_PASSWORD_FORGOTTEN . '.php'))
 {
 zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
 }
 }
}

to this code of code.


if (!(basename($PHP_SELF) == FILENAME_LOGIN . ".php"))
{
$page = basename($PHP_SELF, ".php");
if (!in_array($page, array(FILENAME_DEFAULT,FILENAME_PRODUCT,FILENAME_LOGOFF,FILENAME_ALT_NAV,FILENAME_PASSWORD_FORGOTTEN,FILENAME_DENIED,FILENAME_ADMIN_CONTROL)))
{
if (check_page($page) == FALSE)
{
header("location: ".FILENAME_DENIED.".php");
}
}
if (!isset($_SESSION['admin_id']))
{
if (!(basename($PHP_SELF) == FILENAME_PASSWORD_FORGOTTEN . '.php'))
{
zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
}
}
}

The basic difference between the two bodies of code is in the array definition within the in_array function. It was changed from

in_array($page, array(FILENAME_DEFAULT,FILENAME_PRODUCT,FILENAME_LOGOFF,FILENAME_ALT_NAV,FILENAME_PASSWORD_FORGOTTEN,FILENAME_DENIED)))

to

in_array($page, array(FILENAME_DEFAULT,FILENAME_PRODUCT,FILENAME_LOGOFF,FILENAME_ALT_NAV,FILENAME_PASSWORD_FORGOTTEN,FILENAME_DENIED,FILENAME_ADMIN_CONTROL)))
Bookmark and Share

Editing Product Attribute in Creloaded

In case you have over 1000 product attribute for one or more product options, when you make attempt to edit some attribute your changes might be ignored. To fix this problem open attributes.php in admin and change

echo tep_draw_hidden_field('values[' . $option_id . '][' . $values_row . ']', $value_id) . "\n";

to

echo tep_draw_hidden_field('values[' . $option_id . '][]', $value_id) . "\n";

This should fix the problem.

 

Bookmark and Share