Nathalie W Posted March 22, 2022 Share Posted March 22, 2022 (edited) 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 March 22, 2022 by Boran Chesnik Added more information (see edit history) Link to comment Share on other sites More sharing options...
Nathalie W Posted March 23, 2022 Author Share Posted March 23, 2022 Anyone?! Link to comment Share on other sites More sharing options...
Ress Posted March 23, 2022 Share Posted March 23, 2022 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now