Jump to content
thirty bees forum

Override AdminOrdersController


mauroagr

Recommended Posts

Friends, I am working to override 'part' of adminOrdersController. I try to add onde extra field in orders list, but i dont will copy all _contrunct() from core to add ond extra fields. I try use this, but dont get success. Any can help. public function __construct() { $x = new AdminOrdersControllerCore(); $this->fields_list = array_merge( $x->fields_list, ['tracking_number' => [ 'title' => $this->l('Número Rastreio'), 'havingFilter' => true, 'width' => 100, ], ] ); return AdminOrdersControllerCore::__construct(); }

Link to comment
Share on other sites

Solved! public function __construct() { parent::__construct(); $part1 = array_slice($x->fields_list, 0, 1); $part2 = array_slice($x->fields_list, 2,1); $part3 = array_slice($x->fields_list, 4, 4); $part4 = array_slice($x->fields_list, 8); $this->fields_list = array_merge($part1, $part2, $part3, $extraFields1, $part4); AdminController::__construct(); }

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...