在后台员工选项卡中按 profile_id 过滤员工 [英] Filter employees by profile_id in back office Employees tab
本文介绍了在后台员工选项卡中按 profile_id 过滤员工的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试在后台的员工"选项卡上按个人资料应用过滤器,只需要列出 profile_id = 6 的员工.
i try to apply a filter by profile on my tab "employees" in back-office, just need to list the employees with profile_id = 6.
我在 AdminEmployeesController.php 第 175 至 184 行中找到了这部分代码:
I found this part of code in AdminEmployeesController.php, line 175 to 184 :
public function renderList()
{
$this->_select = 'pl.`name` AS profile ';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'profile` p ON a.`id_profile` = p.`id_profile`
LEFT JOIN `'._DB_PREFIX_.'profile_lang` pl ON (pl.`id_profile` = p.`id_profile` AND pl.`id_lang` = '
.(int)$this->context->language->id.') ';
return parent::renderList();
}
但直到现在我还没有找到正确的解决方案;有人可以帮我吗?
but I don't found the correct solution till now; Can somebody help me?
Prestashop 1.6.0.11
Prestashop 1.6.0.11
推荐答案
您可以修改_where
变量:
$this->_where = 'AND a.`id_profile` = 6';
return parent::renderList();
请不要忘记将您的覆盖放在
Please dont forget to place your override in overriden class in
/overrides/controllers/admin/AdminEmployeesController.php
这篇关于在后台员工选项卡中按 profile_id 过滤员工的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文