zimmer-media Posted August 16, 2017 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' ); } } ```
zimmer-media Posted December 24, 2017 Author Posted December 24, 2017 can an admin or moderator please move this topic to the new category Tips and Tricks
Krystian Posted January 22, 2018 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
Krystian Posted January 22, 2018 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 ')'
wakabayashi Posted January 22, 2018 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' ); } } ```
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