sygram Posted October 19, 2013 Share Posted October 19, 2013 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 Link to comment Share on other sites More sharing options...
absent Posted October 19, 2013 Share Posted October 19, 2013 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 More sharing options...
absent Posted October 19, 2013 Share Posted October 19, 2013 http://doc.prestashop.com/display/PS14/Understanding+and+using+hooks How to add a hook 1 Link to comment Share on other sites More sharing options...
sygram Posted October 19, 2013 Author Share Posted October 19, 2013 Thank you very much for your reply. I will have a look at it, with my rookie skills though. Link to comment Share on other sites More sharing options...
sygram Posted October 20, 2013 Author Share Posted October 20, 2013 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 More sharing options...
absent Posted October 20, 2013 Share Posted October 20, 2013 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 More sharing options...
sygram Posted October 20, 2013 Author Share Posted October 20, 2013 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 More sharing options...
sygram Posted October 23, 2013 Author Share Posted October 23, 2013 Can anyone tell me how to inject html to be included in method renderForm() ? Link to comment Share on other sites More sharing options...
sygram Posted October 28, 2013 Author Share Posted October 28, 2013 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 More sharing options...
Recommended Posts