belicslavko Posted October 7, 2014 Share Posted October 7, 2014 Hi, I build a module for products customization. I need a hook in Admin -> Orders -> View an Order -> Products section down where Customization is normally listed. If use 'displayInvoice' or 'displayAdminOrder' code shows on the top of the page, but I need in the products list. Any help? Link to comment Share on other sites More sharing options...
cristic Posted October 7, 2014 Share Posted October 7, 2014 (edited) Use the hook displayAdminOrder and add the required information from JQuery. For example this is how I add a new button after PDF buttons (Invoice, Delivery Slip...): <script type="text/javascript"> $(document).ready(function(){ $('#id_order_state') .parent() .parent() .parent() .parent() .parent() .parent() .find('.well') .first() .append('<a class="btn btn-default" target="_blank" href="{$receipt_link}"><i class="icon-ticket"></i> {l s='Print receipt'}</a>'); }); </script> Of course, a quicker path could be found (instead of using so many parents ) - but this is just an example from a previous project that I worked on. Edited October 7, 2014 by cristic (see edit history) 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