Please refer to my previous post on the same subject for handling the variables. What makes it different when we want this implementation on wordpress is that seo optimized wordpress sites expose urls like http://www.mydomain.com/my-thankyou-page for a random thank you page after successful order.
Here is what used to happen at 1shoppingcart from 1999 – 2004, we used to send all the variables in a query string which were visible on the thankyou page. Then we were advised to do a form post to the landing thank you page so that the variables are not visible, which made absolute sense. There were no additional checks applied at that time, means what ever your custom thank you page url was, we used to do a form post.
Around 2007-2008 this was changed [I was not working with 1shoppingcart] and they started looking the thank you page url to see if they find extensions .php or .asp if they find it then they do the form post else they skipped the form post [which to me still it does not make any sense.]
Well the situation as of now is that you have to host a .php page outside the scope of wordpress and design it and then you can use all the variables to either customize your thank you page or push data to google analytics for further processing. It is simple with following steps:
- Make your script with the help of variables as mentioned in this post and put it in index.php
- Make an empty folder “thank-you” and put the index.php file in it
- Upload the folder “thank-you” to the content folder on the wordpress site
- Update links to thank you url properly in 1shoppingcart setup
- You are all set to go