Jump to content

Back Office only Module


MrBaseball34

Recommended Posts

Hi,

Your question is how to display or not for employees, depending on their profile a content in the back office?

 

By using

$cookie = new Cookie('psAdmin');
$profile = $cookie->profile;

 

You will have to create profiles.

 

Good dev

Link to comment
Share on other sites

Actually, I know how to get whether they are admins or not, I just need to understand where to put the access limitation code in my module and be able to show them that it is available only for admins. I would like to modify the employee module to not allow anyone to access the employee records without being an admin, too.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

I am trying to write a BO module to export orders in a specific HTML format.

 

The problem I am having is displaying HTML on the tab I have created. I can call the superclass displayForm() and that renders but when I try to show a simple div following, nothing shows...here is the code:

 

 

<?php

 

include_once( PS_ADMIN_DIR.'/../classes/AdminTab.php');

 

class AdminOrderExport extends AdminTab{

 

public function __construct(){

$this->table = 'order';

//$this->className = 'OrderExport';

 

parent::__construct();

}

 

public function displayForm(){

 

parent::displayForm();

echo '<div>Test</div>';

}

 

}

 

It follows with other BO modules I have looked at so any advice would be appreciated.

 

Thanks

Link to comment
Share on other sites

  • 4 months later...

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...