Jump to content

Display Payment used in placing order in BO order detail


popescu.laurentiu

Recommended Posts

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; 
 }

image.thumb.png.dc9a9c685033ba27aec18b1987cb3e78.png

Link to comment
Share on other sites

  • 2 weeks later...

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 by popescu.laurentiu
Update info (see edit history)
Link to comment
Share on other sites

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

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