Open Cart – visible if Admin

I have different levels of admin access. It is not very sophisticated but effective.

I simply edit admin/view/template/common/header.tpl as for example:

<?php if ($this->user->getId() == 1) { ?>
<li><a href="<?php echo $shipping; ?>"><?php echo $text_shipping; ?></a></li>
<li><a href="<?php echo $payment; ?>"><?php echo $text_payment; ?></a></li>
<?php }; ?>
<?php if ($this->user->getId() <3) { ?>
<li><a href="<?php echo $total; ?>"><?php echo $text_total; ?></a></li>
<?php }; ?>

which would hide two menu items from everyone except user_id 1 and another menu item would only show for user_ids 1 and 2.

Posted in Opencart Tagged with: , ,