Jump to content

Hook for customized products (back-office)


belicslavko

Recommended Posts

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

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 by cristic (see edit history)
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...