5haun Posted March 15, 2019 Share Posted March 15, 2019 (edited) Create AdminProductsController.php in /override/controllers/admin/ Copy and paste this code in the file: <?php /* Override AdminProductsController.php to show Manufacturer, Supplier and Supplier Reference column filters on the product list controller */ class AdminProductsController extends AdminProductsControllerCore { public function __construct() { parent::__construct(); $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (m.`id_manufacturer` = a.`id_manufacturer`) LEFT JOIN `'._DB_PREFIX_.'supplier` AS supp ON (supp.id_supplier = a.`id_supplier`) LEFT JOIN `'._DB_PREFIX_.'product_supplier` ps ON ( a.id_product = ps.id_product AND ps.id_product_attribute = 0 )'; $this->fields_list['manufacturer_name'] = array( 'title' => $this->l('Manufacturer'), 'filter_key' => 'm!name', 'orderby' => true, ); $this->fields_list['supp'] = array( 'title' => $this->l('Supplier'), 'filter_key' => 'supp!name' ); $this->fields_list['product_supplier_reference'] = array( 'title' => $this->l('Supplier Reference'), 'align' => 'left', 'filter_key' => 'ps!product_supplier_reference' ); } } 3. Clear cache in Advanced Parameters > Performance Only tested in 1.6.1.x Edited March 15, 2019 by 5haun Added image (see edit history) Link to comment Share on other sites More sharing options...
zod Posted July 24, 2020 Share Posted July 24, 2020 is there a version for Prestashop 1.7? Link to comment Share on other sites More sharing options...
_Veronika_ Posted October 24, 2020 Share Posted October 24, 2020 Hello I tried this code in PS 1.6.1.24 and I had a error in DB: [PrestaShopDatabaseException] Column 'id_manufacturer' in order clause is ambiguous How can I do? thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now