popescu.laurentiu Posted January 17, 2023 Share Posted January 17, 2023 Hi, I need to see on order detail in Back Office what payment was used to place the order. Need to show this always, regardless of the status of the order. I currently have to go back to orders list to see what payment was used. Link to comment Share on other sites More sharing options...
Knowband Plugins Posted January 17, 2023 Share Posted January 17, 2023 There is no such default functioanlity available in prestashop, but you can acheive the same by writing your code. Kindly register below hook and add the below code in any of your module : 1. $this->registerHook('displayAdminOrderTabLink') 2. $this->registerHook('displayAdminOrderTabContent') public function hookDisplayAdminOrderTabLink($params) { return '<li class="nav-item"><a class="nav-link" id="historyTab" data-toggle="tab" href = "#kb_gift_message_data_content" role="tab" aria-controls="kb_gift_message_data_content" aria-expanded="true" aria-selected="false"><i class="material-icons">mail</i>Payment Detail<span class="badge"></span></a> </li>'; } public function hookDisplayAdminOrderTabContent($params) { $order = new Order($params['id_order']); return $order->payment; } Link to comment Share on other sites More sharing options...
popescu.laurentiu Posted January 30, 2023 Author Share Posted January 30, 2023 Thanks for answering. I have to try it and will get back with an answer. 1 Link to comment Share on other sites More sharing options...
popescu.laurentiu Posted January 30, 2023 Author Share Posted January 30, 2023 (edited) Does not work in PS 1.7.5.1 I added code described in a custom module. I registered hooks for the module and I can confirm that the hooks are registered (hooks are shown in module hooks list). Is it because these hooks are not available in PS17.5.1? Edited January 30, 2023 by popescu.laurentiu Update info (see edit history) Link to comment Share on other sites More sharing options...
s4lvozesta Posted January 30, 2023 Share Posted January 30, 2023 Following the same logic on hook implementation, admin123/themes/default/template/controllers/orders/helpers/view/view.tpl on ps 1.7.5.x contains several hooks available, such as HOOK_TAB_ORDER, HOOK_CONTENT_ORDER, etc. You may find the hook name by referring to controllers/admin/AdminOrdersController.php For example, 'HOOK_TAB_ORDER' => Hook::exec('displayAdminOrderTabOrder', array( ... 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