Revert "13444 - add 3 columns in admin products list"

This reverts commit b31a3f9c88.
This commit is contained in:
Srv Privilege de marque 2017-06-12 11:32:48 +02:00
parent b31a3f9c88
commit cbf3c937ac

View File

@ -138,8 +138,6 @@ class AdminProductsController extends AdminProductsControllerCore
LIMIT 1
) as specific_price, a.wholesale_price';
$this->_select .= ', IF(a.unit_price_ratio >0, a.price/a.unit_price_ratio,0) as unit_price ';
if ($join_category)
{
$this->_join .= ' INNER JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_product` = a.`id_product` AND cp.`id_category` = '.(int)$this->_category->id.') ';
@ -183,14 +181,6 @@ class AdminProductsController extends AdminProductsControllerCore
'title' => $this->l('Category'),
'filter_key' => 'cl!name',
);
// antadis 13444
$this->fields_list['weight'] = array(
'title' => $this->l('Poids (kg)'),
'align' => 'text-right'
);
// end antadis
$this->fields_list['wholesale_price'] = array(
'title' => $this->l('Prix d\'achat'),
'type' => 'price',
@ -214,15 +204,6 @@ class AdminProductsController extends AdminProductsControllerCore
'search' => false
);
/* antadis 13444 */
$this->fields_list['unit_price'] = array(
'title' => $this->l('Prix unitaire'),
'align' => 'text-right',
'callback' => 'displayUnitPrice',
'search' => false,
);
/* end antadis */
/*Override Antadis*/
$this->fields_list['specific_price'] = array(
'title' => $this->l('Reduction'),
@ -243,22 +224,6 @@ class AdminProductsController extends AdminProductsControllerCore
//'hint' => $this->l('This is the quantity available in the current shop/group.'),
);
// antadis 13444 : refer to the module "ExtraTabs"
if (Module::isEnabled('extratabs')) {
$this->_select .= ', \'1\' as extra_tabs';
$this->fields_list['extra_tabs'] = array(
'title' => $this->l('Extratabs'),
'align' => 'text-center',
'type' => 'bool',
'class' => 'fixed-width-sm',
'callback' => 'hasExtratabs',
'orderby' => false,
'search' => false
);
}
// end entadis
$this->fields_list['active'] = array(
'title' => $this->l('Status'),
'active' => 'status',
@ -338,14 +303,4 @@ class AdminProductsController extends AdminProductsControllerCore
$this->errors[] = Tools::displayError('Le poids de ce produit doit être défini');
}
}
public static function displayUnitPrice($value, $tr)
{
return Tools::displayPrice($value, Context::getContext()->currency->id);
}
public static function hasExtratabs($value, $tr)
{
return ProductExtraTabModel::getMaxPosition($tr['id_product'])>0 ? "oui" : "--";
}
}