Thanks Eliot,
I need the code to be called only after the purchase is complete. So on the order complete page.
Is there a place in the file where the code should go so that it's called when the order complete page is shown?
eliot wrote: Hi Lorenzo,
I don't think this have to do with Hikahsop since this code can be put everywhere on the page (I think).
You can for example put it in the index.php of your template.
However, if you really want to put this code in Hikashop, the view checkout_step should do the job.