Tags/topics: 
2
Answers
Vote up!
0
Vote down!

How to print variables on the confirmation page (for tracking code)?

Hi,

I am going to work with zanox for affiliate marketing. They use a tracking code which should be placed on the confirmation page. This tracking code needs a few variables like:

- User ID
- Order ID
- Order price (only the line items - no shipping costs)

So I need soms PHP variables on the confirmation page. How can I get these variables?

Asked by: J03Y
on October 17, 2013

2 Answers

Vote up!
0
Vote down!

You could just edit

admin/commerce/config/checkout/form/pane/checkout_completion_message

I looked at the tokens provided on that page and there is no UID or line item price so you could still go to this page and open up the PHP input Filter for this page and embed a view that you use to gather all the information you need.

Travis
Answer by: Travis
Posted: Oct 21, 2013
Vote up!
0
Vote down!

Thanks for your answer tjohnston.

I created a view with the fields uid, order id and order total. Then used views php to get the information I needed.

I am still looking for a solution to split up the order total in different components (base price, tax, shipping). Now there is only one token for order total.

Not sure if http://www.drupalcommerce.org/questions/9046/add-tokens-commerce-order-t... is a working solution.

Answer by: J03Y
Posted: Oct 22, 2013