WqkO Posted January 11, 2016 Share Posted January 11, 2016 Hi, I would like to add an extra column in my orders list so that I can see the invoice number of an order without having to download the pdf.So far, I've found a simple solution that seems to work just fine with my version of Prestashop, but it displays the address and the city instead. Here it is: <?php class AdminOrdersController extends AdminOrdersControllerCore { public function __construct() { parent::__construct(); $this->_select .= ', address.`address1` as saddress, CONCAT(address.`postcode`, \' \', address.`city`) as sville'; $this->fields_list['saddress'] = array( 'title' => $this->l('Address') ); $this->fields_list['sville'] = array( 'title' => $this->l('City') ); } } Would it be possible to adjust it so it displays the invoice number instead? Thanks a lot! Link to comment Share on other sites More sharing options...
WqkO Posted January 13, 2016 Author Share Posted January 13, 2016 Still looking for that answer! Anyone? Link to comment Share on other sites More sharing options...
tuk66 Posted January 13, 2016 Share Posted January 13, 2016 Try <?php class AdminOrdersController extends AdminOrdersControllerCore { public function __construct() { parent::__construct(); $this->fields_list['invoice_number'] = array( 'title' => $this->l('invoice'), 'align' => 'text-center', 'class' => 'fixed-width-xs' ); } } Link to comment Share on other sites More sharing options...
WqkO Posted January 13, 2016 Author Share Posted January 13, 2016 Thank you tuk66, it's working great! Link to comment Share on other sites More sharing options...
Nair Posted October 6, 2020 Share Posted October 6, 2020 On 1/13/2016 at 6:16 PM, tuk66 said: Try <?php class AdminOrdersController extends AdminOrdersControllerCore { public function __construct() { parent::__construct(); $this->fields_list['invoice_number'] = array( 'title' => $this->l('invoice'), 'align' => 'text-center', 'class' => 'fixed-width-xs' ); } } Hello, which file and where exactly do i need to add this to make it work, my prestashop is on 1.7.6.4 Thank you. 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