Jump to content

Help to add tracking code to order confirmation page


Recommended Posts

Posted (edited)


I need help to add a tracking code into my order confirmation page. The code is for affiliate tracking.

This text is the instruction from the provider:


2. Confirmation page

This solution is best applied to the confirmation page, the page the user is redirected to right after the payment is processed successfully. This page needs to contain and execute the tracking code/script in order to report the conversion to the system. The system will process the reported conversion further to determine validity, commissions etc.

The tracking code should be issued as soon as possible in the document, suggested right after the opening body tag.

Where shall i add the code?

And, i also need help with what i shall add in these fields:

        "orderID": "REPLACE WITH YOUR ORDER ID",
        "orderValue": "REPLACE WITH ORDER VALUE",


Edited by Boran Chesnik
Added more information (see edit history)

Share this post

Link to post
Share on other sites

What prestashop version do you have, 1.6, 1.7?

For 1.7:



order_id ->  {$order.details.reference}

order_value-> {$order.totals.total_including_tax.amount}

couponCode-> For this, you have the getCartRules() method in the order class. You can use it to send you the discount code exactly as you need it in tpl, to use it


Share this post

Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More