Jump to content

Add a new column to the list of commands in the backoffice


Rihab002

Recommended Posts

Hello,

 

I want to add two columns in the list of commands in the backoffice (Delivery city and type of delivery).

 

I did the overload AdminOrdersController.php class:

 

I created the file in the AdminOrdersController.php prestashop / override / controllers / admin / with the following content:

 


?php


class AdminOrdersController extends AdminOrdersControllerCore {


public function __construct() {


parent::__construct(); $this->_select .= ', carrier.`name` as scarrier,


CONCAT(address.`postcode`, \' \', address.`city`) as sville';


$this->fields_list['scarrier'] = array( 'title' => $this->l('Type delivery') );


$this->fields_list['sville'] = array( 'title' => $this->l('delivery address') ); }


 


An error message appears when using the search bar / new column filter (Type delivery or delivery address) "Poor SQL Unknown column 'sville' in 'where clause' '


 

  and then I have no access to the backoffice.

 

 

Do you have an idea to solve this problem?

 


Edited by Rihab002 (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...