Jump to content

admin displaysupplier hook


Recommended Posts

Hi there,

 

i would like to display extra info in the admin supplier page. I can not find an admin displaySupplier hook. Is there such an option ?

 

Regards

No, no hook. you have to make a new and placed in the correct location. By the way there is documentation for hook size. Sorry for bad English

http://doc.prestashop.com/display/PS15/Hooks+in+PrestaShop+1.5

Link to comment
Share on other sites

Hi there again,

 

i noticed that in order to add a new custom hook i will have to place the smarty tag in the smarty view file i.e. :

<!-- Admin order hook -->
{hook h="displayAdminOrder" id_order=$order->id}

 

but the AdminSupplierController does not use smarty template at the supplier edit/new page. It calls the method public function renderForm().

 

So i guess it is not possible to add my custom hook there. Any thoughts how to overcome this ?

 

Regards

Link to comment
Share on other sites

Hi there again,

 

i noticed that in order to add a new custom hook i will have to place the smarty tag in the smarty view file i.e. :

<!-- Admin order hook -->

{hook h="displayAdminOrder" id_order=$order->id}

 

but the AdminSupplierController does not use smarty template at the supplier edit/new page. It calls the method public function renderForm().

 

So i guess it is not possible to add my custom hook there. Any thoughts how to overcome this ?

 

Regards

themes/default/template/controllers/suppliers/helpers/view/view.tpl Not suitable?

Link to comment
Share on other sites

Unfortunately this is the tpl for the suppliers' list page, not when editing or adding a new. I am trying to see how i can at least add custom html before line 262 return parent::renderForm(); in file AdminSupplierController.php

Link to comment
Share on other sites

I am replying to my thread in case anyone else faces the same issue. To add html simply add it to the return i.e. :

 

return parent::renderForm() . "<div>html goes here</div>";

 

The only issue is that the file will be overwritten on update. At least a solution till a hook is offered.

Link to comment
Share on other sites

×
×
  • Create New...