Commit e7cf665a authored by tDidierjean's avatar tDidierjean

// fixes to orders->view product, adminsearch->toolbar, admintaxrules hint

parent 541d6dc9
......@@ -28,7 +28,7 @@
<tr>
<td align="center">{if ($product.image->id)}{$product.image_tag}{else}'--'{/if}</td>
<td>
<a href="index.php?tab=AdminCatalog&id_product={$product['product_id']}&updateproduct&token={getAdminToken tab='AdminCatalog'}">
<a href="index.php?controller=adminproducts&id_product={$product['product_id']}&updateproduct&token={getAdminToken tab='AdminProducts'}">
<span class="productName">{$product['product_name']} - {l s='customized'}</span><br />
{if ($product['product_reference'])}{l s='Ref:'} {$product['product_reference']}<br />{/if}
{if ($product['product_supplier_reference'])}{l s='Ref Supplier:'} {$product['product_supplier_reference']}{/if}
......
......@@ -34,7 +34,7 @@
{if ($product['product_quantity'] > $product['customizationQuantityTotal'])}
<tr{if isset($product.image) && $product.image->id && isset($product.image_size)} height="{$product['image_size'][1] + 7}"{/if}>
<td align="center">{if isset($product.image) && $product.image->id}{$product.image_tag}{/if}</td>
<td><a href="index.php?tab=AdminCatalog&id_product={$product['product_id']}&updateproduct&token={getAdminToken tab='AdminCatalog'}">
<td><a href="index.php?controller=adminproducts&id_product={$product['product_id']}&updateproduct&token={getAdminToken tab='AdminProducts'}">
<span class="productName">{$product['product_name']}</span><br />
{if $product.product_reference}{l s='Ref:'} {$product.product_reference}<br />{/if}
{if $product.product_supplier_reference}{l s='Ref Supplier:'} {$product.product_supplier_reference}{/if}
......
......@@ -30,9 +30,21 @@ $(function() {
});
</script>
{if isset($features) || isset($categories) || isset($products) || isset($customers)}
<h2>{l s='Search results'} :</h2>
{if $show_toolbar}
<div class="toolbar-placeholder">
<div class="toolbarBox {if $toolbar_fix}toolbarHead{/if}">
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
<div class="pageTitle">
<h3>
{block name=pageTitle}
<span id="current_obj" style="font-weight: normal;">{$title|default:'&nbsp;'}</span>
{/block}
</h3>
</div>
</div>
</div>
{/if}
{if isset($features)}
{if !$features}
<h3>{l s='No features matching your query'} : {$query}</h3>
......
......@@ -42,7 +42,7 @@ class AdminSearchControllerCore extends AdminController
{
if (!$searchType and strlen($this->query) > 1)
$this->searchFeatures();
/* Product research */
if (!$searchType OR $searchType == 1)
{
......@@ -64,7 +64,7 @@ class AdminSearchControllerCore extends AdminController
if ($searchType AND (int)$this->query AND Validate::isUnsignedInt((int)$this->query))
if ($customer = new Customer((int)$this->query) AND Validate::isLoadedObject($customer))
Tools::redirectAdmin('index.php?tab=AdminCustomers&id_customer='.(int)($customer->id).'&viewcustomer'.'&token='.Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)$this->context->employee->id));
/* Normal customer search */
$this->searchCustomer();
}
......@@ -100,9 +100,9 @@ class AdminSearchControllerCore extends AdminController
// 6 - but it is included in the customer block
}
$this->display = 'view';
}
}
public function searchIP()
{
if (!ip2long(trim($this->query)))
......@@ -131,10 +131,10 @@ class AdminSearchControllerCore extends AdminController
* @params string $query String to find in the catalog
*/
public function searchCustomer()
{
{
$this->_list['customers'] = Customer::searchByName($this->query);
}
/**
* Search a feature in all store
*
......@@ -166,13 +166,13 @@ class AdminSearchControllerCore extends AdminController
$this->_list['features'][$tabs[$key]][] = array('link' => '?tab='.Tools::safeOutput($key).'&token='.Tools::getAdminTokenLite($key) , 'value' => Tools::safeOutput($value));
}
}
if (!count($this->_list['features']))
$this->_list['features'] = false;
else
$this->_list['features'];
}
protected function initCustomerList()
{
$genders_icon = array('default' => 'unknown.gif');
......@@ -194,7 +194,7 @@ class AdminSearchControllerCore extends AdminController
'active' => array('title' => $this->l('Enabled'),'align' => 'center','active' => 'status','type' => 'bool'),
));
}
protected function initProductList()
{
$this->show_toolbar = false;
......@@ -207,16 +207,27 @@ class AdminSearchControllerCore extends AdminController
'status' => array('title' => $this->l('Status'), 'align' => 'center'),
));
}
public function setMedia()
{
parent::setMedia();
$this->addJqueryPlugin('highlight');
}
// Override because we don't want any buttons
public function initToolbar()
{
}
public function initToolbarTitle()
{
$this->toolbar_title = $this->l('Search results');
}
public function initView()
{
$this->tpl_view_vars['query'] = $this->query;
$this->tpl_view_vars['show_toolbar'] = true;
if (sizeof($this->_errors))
return parent::initView();
......@@ -259,10 +270,10 @@ class AdminSearchControllerCore extends AdminController
foreach($this->_list['customers'] as $key => $val)
$this->_list['customers'][$key]['orders'] = Order::getCustomerNbOrders((int)$val['id_customer']);
$view = $helper->generateList($this->_list['customers'], $this->fieldsDisplay['customers']);
}
}
$this->tpl_view_vars['customers'] = $view;
}
return parent::initView();
}
}
}
}
......@@ -286,11 +286,11 @@ class AdminTaxRulesGroupControllerCore extends AdminController
'id' => 'id',
'name' => 'name'
),
'hint' => array(
$this->l('Define the behavior if an address matches multiple rules:'),
'<b>'.$this->l('This Tax Only:').'</b> '.$this->l('Will apply only this tax'),
'<b>'.$this->l('Combine:').'</b> '.$this->l('Combine taxes (eg: 10% + 5% => 15%)'),
'<b>'.$this->l('One After Another:').'</b> '.$this->l('Apply taxes one after another (eg: 100€ + 10% => 110€ + 5% => 115.5€)')
'hint' =>
$this->l('Define the behavior if an address matches multiple rules:').'<br />
<b>'.$this->l('This Tax Only:').'</b> '.$this->l('Will apply only this tax').'<br />
<b>'.$this->l('Combine:').'</b> '.$this->l('Combine taxes (eg: 10% + 5% => 15%)').'<br />
<b>'.$this->l('One After Another:').'</b> '.$this->l('Apply taxes one after another (eg: 100€ + 10% => 110€ + 5% => 115.5€)'
)
),
array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment