Jump to content

Possible to tell from store front if super admin is logged into back end?


sarae

Recommended Posts

We are wanting to have a link from the product pages that takes a super admin to the page to edit that product. This link should only show if a super admin is logged into the back end. Is this possible to do, since the store front and the "back office" are essentially 2 different sites that you log into and an administrator isn't actually logged into the store like a customer is?

 

I've tried the following just for testing purposes:

 

Added to index.php:

 

$smarty->assign('isSuperAdmin', Employee::isSuperAdmin());

 

With this added into index.tpl:

{if $isSuperAdmin}

<h1>You are a Super Admin!</h1>

{else}

<h1>You are not a super admin.</h1>

{/if}

 

The result was the <h1> printed "You are not a super admin", whether or not I was logged into the back office. But I'm guessing this Employee class is for the back office, and not the store front.

 

Any advice is much appreciated!

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...