Jump to content

Hook at the order page (HOOK_TAB_SHIP)


bille88

Recommended Posts

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 :)

post-837421-0-56338100-1410019234_thumb.png

Edited by bille88 (see edit history)
Link to comment
Share on other sites

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

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

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