krizzu Posted July 28, 2016 Share Posted July 28, 2016 Hi I would like to modify Orders Tab in Back Ofiice to have additional columnt with carriers displayed on each order, I got plenty of carriers and its hard to make daily orders without this feature. Any tips how to do that? Best regards Chris. Link to comment Share on other sites More sharing options...
rocky Posted July 29, 2016 Share Posted July 29, 2016 Create override/controllers/admin/AdminOrdersController.php with the following: <?php class AdminOrdersController extends AdminOrdersControllerCore { public function __construct() { parent::__construct(); $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'carrier` ca ON a.`id_carrier` = ca.`id_carrier`'; $this->_select .= ', ca.`name` as carrier_name'; $this->fields_list['carrier_name'] = array( 'title' => $this->l('Carrier') ); } } Remember to go to Advanced Parameters > Performance tab and click the "Clear cache" button (or manually delete cache/class_index.php) so PrestaShop can find the override. 1 Link to comment Share on other sites More sharing options...
krizzu Posted July 29, 2016 Author Share Posted July 29, 2016 Create override/controllers/admin/AdminOrdersController.php with the following: <?php class AdminOrdersController extends AdminOrdersControllerCore { public function __construct() { parent::__construct(); $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'carrier` ca ON a.`id_carrier` = ca.`id_carrier`'; $this->_select .= ', ca.`name` as carrier_name'; $this->fields_list['carrier_name'] = array( 'title' => $this->l('Carrier') ); } } Remember to go to Advanced Parameters > Performance tab and click the "Clear cache" button (or manually delete cache/class_index.php) so PrestaShop can find the override. Thank you rocky you made my day 1 Link to comment Share on other sites More sharing options...
rocky Posted July 30, 2016 Share Posted July 30, 2016 You're welcome. I'm happy to help. 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