// fix BO search
This commit is contained in:
1 parent
cc65b4e0cb
commit
135a169648
4 files changed
+19
-20
No files matched your search
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
*<?php
|
||||||
/*
|
/*
|
||||||
* 2007-2011 PrestaShop
|
* 2007-2011 PrestaShop
|
||||||
*
|
*
|
||||||
@@ -79,7 +79,7 @@ class AdminCountriesControllerCore extends AdminController
|
|||||||
),
|
),
|
||||||
'name' => array(
|
'name' => array(
|
||||||
'title' => $this->l('Country'),
|
'title' => $this->l('Country'),
|
||||||
'width' => 130,
|
'width' => 'auto',
|
||||||
'filter_key' => 'b!name'
|
'filter_key' => 'b!name'
|
||||||
),
|
),
|
||||||
'iso_code' => array(
|
'iso_code' => array(
|
||||||
@@ -104,7 +104,9 @@ class AdminCountriesControllerCore extends AdminController
|
|||||||
'active' => 'status',
|
'active' => 'status',
|
||||||
'type' => 'bool',
|
'type' => 'bool',
|
||||||
'orderby' => false,
|
'orderby' => false,
|
||||||
'filter_key' => 'a!active'
|
'filter_key' => 'a!active',
|
||||||
|
'width' => 25
|
||||||
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class AdminRangePriceControllerCore extends AdminController
|
|||||||
|
|
||||||
$this->fieldsDisplay = array(
|
$this->fieldsDisplay = array(
|
||||||
'id_range_price' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
|
'id_range_price' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
|
||||||
'carrier_name' => array('title' => $this->l('Carrier'), 'align' => 'center', 'width' => 25, 'filter_key' => 'ca!name'),
|
'carrier_name' => array('title' => $this->l('Carrier'), 'align' => 'left', 'width' => 'auto', 'filter_key' => 'ca!name'),
|
||||||
'delimiter1' => array('title' => $this->l('From'), 'width' => 86, 'type' => 'price', 'align' => 'right'),
|
'delimiter1' => array('title' => $this->l('From'), 'width' => 86, 'type' => 'price', 'align' => 'right'),
|
||||||
'delimiter2' => array('title' => $this->l('To'), 'width' => 86, 'type' => 'price', 'align' => 'right'));
|
'delimiter2' => array('title' => $this->l('To'), 'width' => 86, 'type' => 'price', 'align' => 'right'));
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class AdminRangeWeightControllerCore extends AdminController
|
|||||||
|
|
||||||
$this->fieldsDisplay = array(
|
$this->fieldsDisplay = array(
|
||||||
'id_range_weight' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
|
'id_range_weight' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
|
||||||
'carrier_name' => array('title' => $this->l('Carrier'), 'align' => 'center', 'width' => 25, 'filter_key' => 'ca!name'),
|
'carrier_name' => array('title' => $this->l('Carrier'), 'align' => 'left', 'width' => 'auto', 'filter_key' => 'ca!name'),
|
||||||
'delimiter1' => array('title' => $this->l('From'), 'width' => 86, 'float' => true, 'suffix' => Configuration::get('PS_WEIGHT_UNIT'), 'align' => 'right'),
|
'delimiter1' => array('title' => $this->l('From'), 'width' => 86, 'float' => true, 'suffix' => Configuration::get('PS_WEIGHT_UNIT'), 'align' => 'right'),
|
||||||
'delimiter2' => array('title' => $this->l('To'), 'width' => 86, 'float' => true, 'suffix' => Configuration::get('PS_WEIGHT_UNIT'), 'align' => 'right'));
|
'delimiter2' => array('title' => $this->l('To'), 'width' => 86, 'float' => true, 'suffix' => Configuration::get('PS_WEIGHT_UNIT'), 'align' => 'right'));
|
||||||
|
|
||||||
|
|||||||
@@ -27,12 +27,6 @@
|
|||||||
|
|
||||||
class AdminSearchControllerCore extends AdminController
|
class AdminSearchControllerCore extends AdminController
|
||||||
{
|
{
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->display = 'view';
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function postProcess()
|
public function postProcess()
|
||||||
{
|
{
|
||||||
$this->context = Context::getContext();
|
$this->context = Context::getContext();
|
||||||
@@ -105,7 +99,9 @@ class AdminSearchControllerCore extends AdminController
|
|||||||
/* IP */
|
/* IP */
|
||||||
// 6 - but it is included in the customer block
|
// 6 - but it is included in the customer block
|
||||||
}
|
}
|
||||||
|
$this->display = 'view';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function searchIP()
|
public function searchIP()
|
||||||
{
|
{
|
||||||
@@ -220,10 +216,10 @@ class AdminSearchControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initView()
|
public function initView()
|
||||||
{
|
{
|
||||||
$this->context->smarty->assign('query', $this->query);
|
$this->tpl_view_vars['query'] = $this->query;
|
||||||
|
|
||||||
if (sizeof($this->_errors))
|
if (sizeof($this->_errors))
|
||||||
parent::initView();
|
return parent::initView();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$helper = new HelperList();
|
$helper = new HelperList();
|
||||||
@@ -232,13 +228,13 @@ class AdminSearchControllerCore extends AdminController
|
|||||||
$helper->shopLinkType = '';
|
$helper->shopLinkType = '';
|
||||||
$helper->simple_header = true;
|
$helper->simple_header = true;
|
||||||
if (isset($this->_list['features']))
|
if (isset($this->_list['features']))
|
||||||
$this->context->smarty->assign('features', $this->_list['features']);
|
$this->tpl_view_vars['features'] = $this->_list['features'];
|
||||||
if (isset($this->_list['categories']))
|
if (isset($this->_list['categories']))
|
||||||
{
|
{
|
||||||
$categorie = array();
|
$categories = array();
|
||||||
foreach($this->_list['categories'] as $category)
|
foreach($this->_list['categories'] as $category)
|
||||||
$categorie[] = getPath(self::$currentIndex.'?tab=AdminCatalog', (int)$category['id_category']);
|
$categories[] = getPath(self::$currentIndex.'?tab=AdminCatalog', (int)$category['id_category']);
|
||||||
$this->context->smarty->assign('categories', $categorie);
|
$this->tpl_view_vars['categories'] = $categories;
|
||||||
}
|
}
|
||||||
if (isset($this->_list['products']))
|
if (isset($this->_list['products']))
|
||||||
{
|
{
|
||||||
@@ -249,7 +245,8 @@ class AdminSearchControllerCore extends AdminController
|
|||||||
$helper->show_toolbar = false;
|
$helper->show_toolbar = false;
|
||||||
if ($this->_list['products'])
|
if ($this->_list['products'])
|
||||||
$view = $helper->generateList($this->_list['products'], $this->fieldsDisplay['products']);
|
$view = $helper->generateList($this->_list['products'], $this->fieldsDisplay['products']);
|
||||||
$this->context->smarty->assign('products', $view);
|
|
||||||
|
$this->tpl_view_vars['products'] = $view;
|
||||||
}
|
}
|
||||||
if (isset($this->_list['customers']))
|
if (isset($this->_list['customers']))
|
||||||
{
|
{
|
||||||
@@ -263,9 +260,9 @@ class AdminSearchControllerCore extends AdminController
|
|||||||
$this->_list['customers'][$key]['orders'] = Order::getCustomerNbOrders((int)$val['id_customer']);
|
$this->_list['customers'][$key]['orders'] = Order::getCustomerNbOrders((int)$val['id_customer']);
|
||||||
$view = $helper->generateList($this->_list['customers'], $this->fieldsDisplay['customers']);
|
$view = $helper->generateList($this->_list['customers'], $this->fieldsDisplay['customers']);
|
||||||
}
|
}
|
||||||
$this->context->smarty->assign('customers', $view);
|
$this->tpl_view_vars['customers'] = $view;
|
||||||
}
|
}
|
||||||
parent::initView();
|
return parent::initView();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user