zimmer-media Posted August 16, 2017 Share Posted August 16, 2017 A must have for my shops. A customer has a question about his order and only gives the invoice number. First look for the customer, then look in his orders what he means. Search and check. Better and faster search in the order list for the invoice number. Either integrated as an override or as a basiscode. override/controllers/admin/ -> create new file "AdminOrdersController.php" ``` <?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...
zimmer-media Posted December 24, 2017 Author Share Posted December 24, 2017 can an admin or moderator please move this topic to the new category Tips and Tricks Link to comment Share on other sites More sharing options...
wakabayashi Posted December 25, 2017 Share Posted December 25, 2017 Thanks for this nice tip! Link to comment Share on other sites More sharing options...
Krystian Posted January 22, 2018 Share Posted January 22, 2018 Hello, How to add more than one additional column? I added 'City' and I don't know how to add another one like 'postcode'. Thanks Link to comment Share on other sites More sharing options...
Krystian Posted January 22, 2018 Share Posted January 22, 2018 <?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' $this->fields_list['postcode'] = array( 'title' => $this->l('Postcode'), 'align' => 'text-center', 'class' => 'fixed-width-xs' ); } } And after adding this I see this message. FatalErrorException in AdminOrdersController.php line 14: Parse Error: syntax error, unexpected '$this' (T_VARIABLE), expecting ')' Link to comment Share on other sites More sharing options...
wakabayashi Posted January 22, 2018 Share Posted January 22, 2018 Your code is not correct... Try this: ``` <?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' ); $this->fields_list['postcode'] = array( 'title' => $this->l('Postcode'), 'align' => 'text-center', 'class' => 'fixed-width-xs' ); } } ``` Link to comment Share on other sites More sharing options...
Krystian Posted January 22, 2018 Share Posted January 22, 2018 Thanks, it works. I appreciate it. 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