Jump to content

Filter ListAdmin product


Recommended Posts

Hi,

In my module  for presta 1.7.2 I created a ps_product_employee in the way  that the product_id and the employee_id are stored in myps_product_employee how can I filter the list admni product so that the employee(seller) see only his products 

I used this code can you help me to solve the problem ? 


public function hookactionAdminProductsListingFieldsModifier($params)
{
  
$params['sql_table']['m'] = [
'table' => 'product_employee',
'join' => 'INNER JOIN',
'on' => 'm.`id_emp` = '.$this->context->employee->id,
];

}

}

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