Когда мой контроллер виводит даные с другой таблицы то фильтр работает:
Код:
/**
* @property Organization $object
*/
//Language::getIsoById($this->context->employee->id_lang))
class AdminRequestsNoSentControllerCore extends AdminController
{
public function __construct()
{
$this->bootstrap = true;
$this->className = 'RequestsInProgress';
$this->lang = false;
$this->context = Context::getContext();
$this->addRowAction('view');
$this->table = 'request_list';
$this->fields_list = array(
'id_request_list' => array(
'title' => $this->l('Request ID'),
'align' => 'center',
'class' => 'fixed-width-xs'),
/*'user_id' => array(
'title' => $this->l('User')
),*/
'customer' => array(
'title' => $this->l('Customer'),
'havingFilter' => true,
),
'date' => array(
'title' => $this->l('Date'),
'type' => 'datetime'
),
'part_count' => array(
'title' => $this->l('Parts count'),
'orderby' => false,
'filter' => false,
'search' => false
)
);
parent::__construct();
}
}
а если я вывожу с которой мне нужно то нет:
Код:
<?php
/**
* @property Organization $object
*/
//Language::getIsoById($this->context->employee->id_lang))
class AdminRequestsNoSentControllerCore extends AdminController
{
public function __construct()
{
$this->bootstrap = true;
$this->className = 'AdminRequestsNoSent';
$this->lang = false;
$this->context = Context::getContext();
$this->table = 'requests_parts';
$this->addRowAction('send');
$this->_select .= 'c.`company`, c.`lastname` ';
$this->_where = ' AND (a.active = 0) ';//AND (a.`user_id` = c.`id_customer`)
$this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = a.`user_id`)';
$this->_orderBy = 'date_add';
$this->_orderWay = 'DESC';
$this->fields_list = array(
'company' => array(
'title' => $this->l('Organization'),
'align' => 'center'),
'lastname' => array(
'title' => $this->l('Customer'),
'align' => 'center'),
'name' => array(
'title' => $this->l('brand'),
'align' => 'center'),
'part_number' => array(
'title' => $this->l('part_number'),
'align' => 'center'),
'comment' => array(
'title' => $this->l('comment'),
'align' => 'center',
'filter' => false,),
'date_add' => array(
'title' => $this->l('date_add'),
'align' => 'center'),
/*'user_id' => array(
'title' => $this->l('User')
),*/
);
//$brand = Db::getInstance ()->getValue('SELECT `id_customer` FROM `' . _DB_PREFIX_ . 'user_facebook` WHERE `id_facebook` = "90"');
if(isset($_GET['id_carrier']))
{
//Db::getInstance()->Execute("UPDATE `"._DB_PREFIX_."requests_parts` SET `active`=1 where `id_requests_parts`='".(int)$_GET['id_carrier']."'");
AdminRequestsNoSentController::sendEmail((int)$_GET['id_carrier']);
}
parent::__construct();
}
}