FCP Posted October 29, 2012 Share Posted October 29, 2012 Hi, quick question is it possible to search products by UPC from the admin panel without using the advanced stock management? Basically I would just like to have the UPC filter in the "catalog > products" page, exactly as it is for "reference", "category" or "product name", without having to move to the stock section I also tried to search by UPC using the generic search box at the top but no product is found so I guess the search doesn't run on the UPC field at all Link to comment Share on other sites More sharing options...
BillyHardcore Posted November 4, 2012 Share Posted November 4, 2012 (edited) Hello! If you want to add a filter to your product list in the backoffice, this is what you should do: Go to /catalog/controllers/admin/ and open AdminProductsController.php You go to line ~180-200 where you find a list of array's like so: $this->fields_list = array(); $this->fields_list['id_product'] = array( 'title' => $this->l('ID'), 'align' => 'center', 'width' => 20 ); $this->fields_list['image'] = array( 'title' => $this->l('Photo'), 'align' => 'center', 'image' => 'p', 'width' => 70, 'orderby' => false, 'filter' => false, 'search' => false ); $this->fields_list['name'] = array( 'title' => $this->l('Name'), 'filter_key' => 'b!name' ); $this->fields_list['reference'] = array( 'title' => $this->l('Reference'), 'align' => 'left', 'width' => 80 ); Then you can copy/paste one of the array's and assign another field to use, for instance: $this->fields_list['reference'] = array( 'title' => $this->l('Reference'), 'align' => 'left', 'width' => 80 ); Becomes: $this->fields_list['upc'] = array( 'title' => $this->l('UPC'), 'align' => 'left', 'width' => 80 ); Edit: You probably shouldnt mess around in the original AdminProductsController.php , the ideal solution is to use the controller overrides function. Edited November 4, 2012 by BillyHardcore (see edit history) Link to comment Share on other sites More sharing options...
Stefand Posted September 8, 2013 Share Posted September 8, 2013 (edited) In PS 1.5.5 this works : $this->fields_list['ean13'] = array( 'title' => $this->l('EAN'), 'align' => 'left', 'width' => 80 ); Edited September 8, 2013 by Stefand (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts