Jump to content

SOLVED - How to Add Stock to BO Search Results


WebWoman

Recommended Posts

Wow! I just solved this myself. I'm using PrestaShop 1.6.1.6.

 

I added the following line in AdminSearchController.php (found in controllers/admin/):

	'quantity' => array('title' => $this->l('Quantity'), 'align' => 'right', 'width' => '20'), 

so the function now looks like this:

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'),
	    'quantity' => array('title' => $this->l('Quantity'), 'align' => 'right', 'width' => '20'),
            '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')
        );
    }

Maybe someone else will find this useful.

 

 

 

 

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...