Jump to content

Adding product quantity in each results in BACKEND PS


Recommended Posts

Hi everyone,


Im hoping to add the product quantity when searching for the product in the backend.


Currently I go to products and then go down to product name field and type in the product name and press filter.

Trouble is, we have a lot of products and load time means it takes a while to do this.


A simpler way is to type the product into the search field in the backend, but the result doesnt show the product quantity.


Can someone help me to do this?


I've found AdminSearchController.php in controllers/admin/


Here seems to be the code:

protected function initProductList(){
$this->show_toolbar = false;
$this->fields_list['products'] = array(
'id_product' => array('title' => $this->l('ID'), 'width' => 25),
'manufacturer_name' => array('title' => $this->l('Manufacturer'), 'align' => 'center', 'width' => 200),
'reference' => array('title' => $this->l('Reference'), 'align' => 'center', 'width' => 150),
'name' => array('title' => $this->l('Name'), 'width' => 'auto'),
'price_tax_excl' => array('title' => $this->l('Price (tax excl.)'), 'align' => 'right', 'type' => 'price', 'width' => 60),
'price_tax_incl' => array('title' => $this->l('Price (tax incl.)'), 'align' => 'right', 'type' => 'price', 'width' => 60),
'active' => array('title' => $this->l('Active'), 'width' => 70, 'active' => 'status', 'align' => 'center', 'type' => 'bool')
What would be the syntax to add product quantity to this? 
Am I looking at the right thing?
Would it be better to do this as an override?
In which case, what would I put in the override file?
The modified AdminSearchController.php file in total or just a snippet of code?
Thanks in advance.
Edited by nikmagnus (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...