bille88 Posted September 6, 2014 Share Posted September 6, 2014 (edited) Hi I am trying to add a button somewhere with the order view page. I looked around the file view.tpl and found that the hook displayAdminOrder must be the most suitable for my needs. If i just attach a tpl file to that hook, then my content will be shown a the top of the page. Instead I would like to add a tab next to "SHIPPING" and "MERCHANDISE RETURNS" I can see that if the code {$HOOK_TAB_SHIP} contained the following I would be homesafe: <li class="active"> <a href="#TEST"> <i class="icon-truck "></i> {l s='TEST'} </a> </li> Can anybody help me understand how I do that with hooks? Thanks for your time Edited September 6, 2014 by bille88 (see edit history) Link to comment Share on other sites More sharing options...
PhpMadman Posted September 8, 2014 Share Posted September 8, 2014 Hello. The original pullrequest: https://github.com/PrestaShop/PrestaShop/pull/1844 The module used for testing: https://github.com/PhpMadman/TestModule/tree/DisplayAdminOrderHooks Hope this help. The hooks are a 2 part system. HOOK_TAB_X and HOOK_CONTENT_X 1 Link to comment Share on other sites More sharing options...
bille88 Posted September 8, 2014 Author Share Posted September 8, 2014 Hello. The original pullrequest: https://github.com/PrestaShop/PrestaShop/pull/1844 The module used for testing: https://github.com/PhpMadman/TestModule/tree/DisplayAdminOrderHooks Hope this help. The hooks are a 2 part system. HOOK_TAB_X and HOOK_CONTENT_X Dear PhpMadman Thank you so much for your answer. It seems this will do the trick I can't seem to find your module on my list once I have uploaded it even though it says "The module was successfully downloaded.". Do you know how I can see from GitHub what versions of PrestaShop 1.6 that will contain this commit? Thanks for your time. Link to comment Share on other sites More sharing options...
PhpMadman Posted September 8, 2014 Share Posted September 8, 2014 Hello. When downloading from github, the branchname is added to file / folder. So you need top open it and remove the -displayAdminOrderHooks text from main folder. And also do the same on the actual zip. And the hooks was added in 1.6.0.9. Link to comment Share on other sites More sharing options...
bille88 Posted September 8, 2014 Author Share Posted September 8, 2014 Hello. When downloading from github, the branchname is added to file / folder. So you need top open it and remove the -displayAdminOrderHooks text from main folder. And also do the same on the actual zip. And the hooks was added in 1.6.0.9. Thanks for your help. This works like a charm. In version 1.6.0.9 is it also possible to add buttons next to the "print order" button in the top? kind regards Link to comment Share on other sites More sharing options...
PhpMadman Posted September 8, 2014 Share Posted September 8, 2014 Not by using hooks. You have to manually edit the file for that. Link to comment Share on other sites More sharing options...
bille88 Posted September 10, 2014 Author Share Posted September 10, 2014 Not by using hooks. You have to manually edit the file for that. Thank you for your help! It works like a charm and I will add an action button in the shipping box then 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