Jump to content

For an new employee restrict access to old orders


Aurimasg

Recommended Posts

Hello, I have new employee  and want to hide the old orders for him. I cant find this function in BO, so maybe you can help to code it? 

I want hide all orders who are older then 2018/10/01 for employeers profiles ID == 3

PS version 1.6.1.11

 

Thank you in advance

Edited by Aurimasg (see edit history)
Link to comment
Share on other sites

1 hour ago, Aurimasg said:

Hello, I have new employee  and want to hide the old orders for him. I cant find this function in BO, so maybe you can help to code it? 

I want hide all orders who are older then 2018/10/01 for employeers profiles ID == 3

 

Thank you in advance

 

What have you done so far? :)

Link to comment
Share on other sites

I have done by myself. If somebody will need it, here is code:

 

controllers/admin/AdminOrdersController.php (line: 69) add code:

        if($this->context->employee->id_profile == 4)
        {
            $this->_where .= ' AND a.id_order > 6440';
        }

here:

4 - is employee ID

6442 - is last order ID which you want to display for this employee

  • Like 2
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...