// change to price parameter in list
This commit is contained in:
@@ -174,8 +174,8 @@
|
||||
<option value="0" {if $params.value == 0 && $params.value != ''} selected="selected" {/if}>{l s='No'}</option>
|
||||
</select>
|
||||
{elseif $params.type == 'date' || $params.type == 'datetime'}
|
||||
{l s='From'} <input type="text" class="filter datepicker" id="{$name_id}_0" name="{$name}[0]" value="{if isset($value.0)}$value.0{/if}"{if isset($params.width)} style="width:{$params.width}px"{/if}/><br />
|
||||
{l s='To'} <input type="text" class="filter datepicker" id="{$name_id}_1" name="{$name}[1]" value="{if isset($value.1)}$value.1{/if}"{if isset($params.width)} style="width:{$params.width}px"{/if}/>
|
||||
{l s='From'} <input type="text" class="filter datepicker" id="{$name_id}_0" name="{$name}[0]" value="{if isset($value.0)}$value.0{/if}"{if isset($params.width)} style="width:70px"{/if}/><br />
|
||||
{l s='To'} <input type="text" class="filter datepicker" id="{$name_id}_1" name="{$name}[1]" value="{if isset($value.1)}$value.1{/if}"{if isset($params.width)} style="width:70px"{/if}/>
|
||||
{elseif $params.type == 'select'}
|
||||
{if isset($params.filter_key)}
|
||||
<select onchange="$('#submitFilterButton{$table}').focus();$('#submitFilterButton{$table}').click();" name="{$table}Filter_{$params.filter_key}" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
@@ -188,7 +188,7 @@
|
||||
</select>
|
||||
{/if}
|
||||
{else}
|
||||
<input type="text" class="filter" name="{$table}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" value="{$params.value|escape:'htmlall':'UTF-8'}" {if isset($params.width)} style="width:{$params.width}px"{/if} />
|
||||
<input type="text" class="filter" name="{$table}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" value="{$params.value|escape:'htmlall':'UTF-8'}" {if isset($params.width) && $params.width != 'auto'} style="width:{$params.width}px"{else}style="width:95%"{/if} />
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
+20
-17
@@ -229,7 +229,7 @@ class HelperListCore extends Helper
|
||||
|
||||
if (method_exists($this->context->controller, $method_name))
|
||||
$this->_list[$index][$action] = $this->context->controller->$method_name($token, $id);
|
||||
else if (method_exists($this, $method_name))
|
||||
elseif (method_exists($this, $method_name))
|
||||
$this->_list[$index][$action] = $this->$method_name($token, $id);
|
||||
|
||||
}
|
||||
@@ -259,9 +259,9 @@ class HelperListCore extends Helper
|
||||
Tools::getValue('id_product')
|
||||
);
|
||||
}
|
||||
else if (isset($params['activeVisu']))
|
||||
elseif (isset($params['activeVisu']))
|
||||
$this->_list[$index][$key] = (bool)$tr[$key];
|
||||
else if (isset($params['position']))
|
||||
elseif (isset($params['position']))
|
||||
{
|
||||
$this->_list[$index][$key] = array(
|
||||
'position' => $tr[$key],
|
||||
@@ -273,7 +273,7 @@ class HelperListCore extends Helper
|
||||
'&way=0&position='.((int)$tr['position'] - 1).'&token='.$this->token
|
||||
);
|
||||
}
|
||||
else if (isset($params['image']))
|
||||
elseif (isset($params['image']))
|
||||
{
|
||||
// item_id is the product id in a product image context, else it is the image id.
|
||||
$item_id = isset($params['image_id']) ? $tr[$params['image_id']] : $id;
|
||||
@@ -287,24 +287,27 @@ class HelperListCore extends Helper
|
||||
|
||||
$this->_list[$index][$key] = cacheImage($path_to_image, $this->table.'_mini_'.$item_id.'.'.$this->imageType, 45, $this->imageType);
|
||||
}
|
||||
else if (isset($params['icon']) && (isset($params['icon'][$tr[$key]]) || isset($params['icon']['default'])))
|
||||
elseif (isset($params['icon']) && (isset($params['icon'][$tr[$key]]) || isset($params['icon']['default'])))
|
||||
$this->_list[$index][$key] = isset($params['icon'][$tr[$key]]) ? $params['icon'][$tr[$key]] : $params['icon']['default'];
|
||||
else if (isset($params['price']))
|
||||
{
|
||||
$currency = isset($params['currency']) ? Currency::getCurrencyInstance($tr['id_currency']) : $this->context->currency;
|
||||
$this->_list[$index][$key] = Tools::displayPrice($tr[$key], ($currency), false);
|
||||
}
|
||||
else if (isset($params['float']))
|
||||
elseif (isset($params['float']))
|
||||
$this->_list[$index][$key] = rtrim(rtrim($tr[$key], '0'), '.');
|
||||
else if (isset($params['type']) && $params['type'] == 'date')
|
||||
$this->_list[$index][$key] = Tools::displayDate($tr[$key], $this->context->language->id);
|
||||
else if (isset($params['type']) && $params['type'] == 'datetime')
|
||||
$this->_list[$index][$key] = Tools::displayDate($tr[$key], $this->context->language->id, true);
|
||||
else if (isset($tr[$key]))
|
||||
elseif (isset($params['type']))
|
||||
{
|
||||
if ($params['type'] == 'price')
|
||||
{
|
||||
$currency = isset($params['currency']) ? Currency::getCurrencyInstance($tr['id_currency']) : $this->context->currency;
|
||||
$this->_list[$index][$key] = Tools::displayPrice($tr[$key], $currency, false);
|
||||
}
|
||||
elseif ($params['type'] == 'date')
|
||||
$this->_list[$index][$key] = Tools::displayDate($tr[$key], $this->context->language->id);
|
||||
elseif ($params['type'] == 'datetime')
|
||||
$this->_list[$index][$key] = Tools::displayDate($tr[$key], $this->context->language->id, true);
|
||||
}
|
||||
elseif (isset($tr[$key]))
|
||||
{
|
||||
if ($key == 'price')
|
||||
$echo = round($tr[$key], 2);
|
||||
else if (isset($params['maxlength']) && Tools::strlen($tr[$key]) > $params['maxlength'])
|
||||
elseif (isset($params['maxlength']) && Tools::strlen($tr[$key]) > $params['maxlength'])
|
||||
$echo = '<span title="'.$tr[$key].'">'.Tools::substr($tr[$key], 0, $params['maxlength']).'...</span>';
|
||||
else
|
||||
$echo = $tr[$key];
|
||||
|
||||
@@ -58,11 +58,11 @@ class AdminCustomersControllerCore extends AdminController
|
||||
'id_customer' => array(
|
||||
'title' => $this->l('ID'),
|
||||
'align' => 'center',
|
||||
'width' => 25
|
||||
'width' => 20
|
||||
),
|
||||
'id_gender' => array(
|
||||
'title' => $this->l('Gender'),
|
||||
'width' => 50,
|
||||
'width' => 70,
|
||||
'align' => 'center',
|
||||
'icon' => $genders_icon,
|
||||
'orderby' => false,
|
||||
@@ -84,7 +84,7 @@ class AdminCustomersControllerCore extends AdminController
|
||||
),
|
||||
'age' => array(
|
||||
'title' => $this->l('Age'),
|
||||
'width' => 50,
|
||||
'width' => 20,
|
||||
'search' => false,
|
||||
'align' => 'center'
|
||||
),
|
||||
@@ -114,13 +114,13 @@ class AdminCustomersControllerCore extends AdminController
|
||||
),
|
||||
'date_add' => array(
|
||||
'title' => $this->l('Registration'),
|
||||
'width' => 70,
|
||||
'width' => 150,
|
||||
'type' => 'date',
|
||||
'align' => 'right'
|
||||
),
|
||||
'connect' => array(
|
||||
'title' => $this->l('Connection'),
|
||||
'width' => 60,
|
||||
'width' => 100,
|
||||
'type' => 'datetime',
|
||||
'search' => false
|
||||
)
|
||||
|
||||
@@ -63,12 +63,12 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$this->fieldsDisplay = array(
|
||||
'id_order' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
|
||||
'new' => array('title' => $this->l('New'), 'width' => 25, 'align' => 'center', 'type' => 'bool', 'filter_key' => 'new', 'tmpTableFilter' => true, 'icon' => array(0 => 'blank.gif', 1 => 'news-new.gif'), 'orderby' => false),
|
||||
'customer' => array('title' => $this->l('Customer'), 'widthColumn' => 160, 'width' => 140, 'filter_key' => 'customer', 'tmpTableFilter' => true),
|
||||
'total_paid' => array('title' => $this->l('Total'), 'width' => 70, 'align' => 'right', 'prefix' => '<b>', 'suffix' => '</b>', 'price' => true, 'currency' => true),
|
||||
'customer' => array('title' => $this->l('Customer'), 'filter_key' => 'customer', 'tmpTableFilter' => true),
|
||||
'total_paid' => array('title' => $this->l('Total'), 'width' => 70, 'align' => 'right', 'prefix' => '<b>', 'suffix' => '</b>', 'type' => 'price', 'currency' => true),
|
||||
'payment' => array('title' => $this->l('Payment'), 'width' => 100),
|
||||
'osname' => array('title' => $this->l('Status'), 'widthColumn' => 230, 'type' => 'select', 'list' => $statesArray, 'filter_key' => 'os!id_order_state', 'filter_type' => 'int', 'width' => 200),
|
||||
'osname' => array('title' => $this->l('Status'), 'width' => 230, 'type' => 'select', 'list' => $statesArray, 'filter_key' => 'os!id_order_state', 'filter_type' => 'int', 'width' => 200),
|
||||
'date_add' => array('title' => $this->l('Date'), 'width' => 35, 'align' => 'right', 'type' => 'datetime', 'filter_key' => 'a!date_add'),
|
||||
'id_pdf' => array('title' => $this->l('PDF'), 'callback' => 'printPDFIcons', 'orderby' => false, 'search' => false));
|
||||
'id_pdf' => array('title' => $this->l('PDF'), 'width' => 35, 'align' => 'center', 'callback' => 'printPDFIcons', 'orderby' => false, 'search' => false));
|
||||
$this->shopLinkType = 'shop';
|
||||
$this->shopShareDatas = Shop::SHARE_ORDER;
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@ class AdminProductsController extends AdminController
|
||||
'name' => array('title' => $this->l('Name'), 'filter_key' => 'b!name'),
|
||||
'reference' => array('title' => $this->l('Reference'), 'align' => 'center', 'width' => 80),
|
||||
'name_category' => array('title' => $this->l('Category'), 'width' => 100, 'filter_key' => 'cl!name'),
|
||||
'price' => array('title' => $this->l('Base price'), 'width' => 70, 'price' => true, 'align' => 'right', 'filter_key' => 'a!price'),
|
||||
'price_final' => array('title' => $this->l('Final price'), 'width' => 70, 'price' => true, 'align' => 'right', 'havingFilter' => true, 'orderby' => false),
|
||||
'price' => array('title' => $this->l('Base price'), 'width' => 70, 'type' => 'price', 'align' => 'right', 'filter_key' => 'a!price'),
|
||||
'price_final' => array('title' => $this->l('Final price'), 'width' => 70, 'type' => 'price', 'align' => 'right', 'havingFilter' => true, 'orderby' => false),
|
||||
'active' => array('title' => $this->l('Displayed'), 'width' => 70, 'active' => 'status', 'filter_key' => 'a!active', 'align' => 'center', 'type' => 'bool', 'orderby' => false),
|
||||
'position' => array('title' => $this->l('Position'), 'width' => 70,'filter_key' => 'cp!position', 'align' => 'center', 'position' => 'position'),
|
||||
);
|
||||
|
||||
@@ -40,8 +40,8 @@ class AdminRangePriceControllerCore extends AdminController
|
||||
$this->fieldsDisplay = array(
|
||||
'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'),
|
||||
'delimiter1' => array('title' => $this->l('From'), 'width' => 86, 'price' => true, 'align' => 'right'),
|
||||
'delimiter2' => array('title' => $this->l('To'), 'width' => 86, 'price' => true, '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'));
|
||||
|
||||
$this->_join = 'LEFT JOIN '._DB_PREFIX_.'carrier ca ON (ca.`id_carrier` = a.`id_carrier`)';
|
||||
$this->_select = 'ca.`name` AS carrier_name';
|
||||
|
||||
@@ -206,7 +206,7 @@ class AdminSearchControllerCore extends AdminController
|
||||
'manufacturer_name' => array('title' => $this->l('Manufacturer'), 'align' => 'center'),
|
||||
'reference' => array('title' => $this->l('Reference'), 'align' => 'center'),
|
||||
'name' => array('title' => $this->l('Name')),
|
||||
'price' => array('title' => $this->l('Price'), 'align' => 'right', 'price' => true),
|
||||
'price' => array('title' => $this->l('Price'), 'align' => 'right', 'type' => 'price'),
|
||||
'status' => array('title' => $this->l('Status'), 'align' => 'center'),
|
||||
));
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ class AdminStockMvtControllerCore extends AdminController
|
||||
'title' => $this->l('Price (TE)'),
|
||||
'width' => 70,
|
||||
'align' => 'right',
|
||||
'price' => true,
|
||||
'type' => 'price',
|
||||
'currency' => true,
|
||||
'filter_key' => 'a!price_te'
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user