Jump to content

How can I Add hook in AdminOrder using custom psp module ?


Tito
 Share

Recommended Posts

hi,

How can I add a hook in AdminOrder, through psp module installation ?

In AdminOrders.php , ln 262 , there is a $hook already setup,
but how can I use it ?

( I try to add an extra link to psp back office with orderid so admin can interact with psp api.
To use with my "Ogone psp module":http://www.prestashop.com/forums/viewthread/5741/modules/ogone_psp_module_v0_dot_2/ )

Share this post


Link to post
Share on other sites

  • 4 years later...

Maybe this will help newbie like me.

I'm searching same question, and i found this thread, and i found my solution.

 

U can try to add this :

public function hookAdminOrder($params)
{
 $order = new Order($params['id_order']);
 $html = '<br /><fieldset style="width:400px;"><legend>' . $this->l('TEST ADDITIONAL FIRLDSET') . '</legend>';
 $html .= '</fieldset>';
 return $html;
}

 

And dont forget to register hookAdminOrder

 

Hope this help others.

Share this post


Link to post
Share on other sites

  • 2 years later...

The topic was older ,now i suggest to do this ;using that code please;

 

 

 public function hookDisplayAdminOrder($params)
    {
        $this->html = '<br /><fieldset style="width:400px;"><legend>CID 订单详情-附件商品</legend>';
        $this->html .= '</fieldset>';
        return $this->html;
    }

 

 

and at the install() method add this

 

 !$this->registerHook('displayAdminOrder')

 

the complate code is

 

public function install() {
   

if (!parent::install() ||!$this->registerHook('adminCustomers')||!$this->registerHook('displayAdminOrder'))

{
    return false;
}
    return true;
}

 

please have a try. good bey.

  • Like 1

Share this post


Link to post
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More