Jump to content

Help to add tracking code to order confirmation page


Nathalie W

Recommended Posts

Hi

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:

Quote

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",
        "couponCode": "REPLACE WITH USED COUPON CODE, BLANK IF NOT USED"

Thanks!

Edited by Boran Chesnik
Added more information (see edit history)
Link to comment
Share on other sites

What prestashop version do you have, 1.6, 1.7?

For 1.7:

prestashop_root/themes/your_theme/templates/checkout/order-confirmation.tpl

Variables:

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

 

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