Jump to content

need to add a java function in the last page prestashop 1.7


Recommended Posts

Im going to change my question of this topic.
And i hope someone is understand what i mean.

I need to add a java function to the checkout page and thank you page, i have search the internet but i can´t find witch page it is.
So i hope someone can point me in the right direction.

The java function i need to add to the page is :

{literal}
<script>
pertentoReportConversion('purchase', {
  currencyCode: order.currency,     
  revenue: order.totalAmount,       
  tax: order.taxAmount,             
  shipping: order.shippingCost      
})
</script>
{/literal}

Where can i find the transaction page.

I use prestashop 1.7.6.0

Edited by spc
Change my question (see edit history)
Link to comment
Share on other sites

Adding changes directly to the files is not suggested. Use hooks like displayHeader OR displayFooter from the custom module to achieve the same.

Also, I believe you are adding the JS changes. If yes, then they can be added in the header.tpl OR fotter.tpl of the theme file. 

Path for the default theme 

themes/classic/templates/_partials/header.tpl
themes/classic/templates/_partials/footer.tpl

 

 

 

Link to comment
Share on other sites

Hi, thanks for your answer, could you show an example of how to get this code into the script.
I honestly don't know how I'm supposed to put it in.

Link to comment
Share on other sites

  • spc changed the title to need to add a java function in the last page prestashop 1.7

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