For all those 1ShoppingCart.com users that are struggling to display some of the POST variables sent from 1Shoppingcart.com to your WordPress pages, there is a easy way.
Jeremy Shapiro of Asandia has created a plugin called URL Params that is perfect for the job.
Once the plugin is installed you can use the following shortcode to display variables sent from a signup form and/or order/purchase form –
[[urlparam param="{the post variable}" default="{a string to display if the variable is not found}]]
Say for example you want to display the following on a page thanking people for purchasing access to your webinar and provide additional information about the event –
Thank you Customer Name for registering for our Online Webinar. Your purchase confirmation and event details have been sent to your email address, Email address. We look forward to seeing/hearing from you on the 15th at 9:00am EST.
You would enter the following within the page –
Thank you <strong>[[urlparam param="Name,name" default="Not on file" /]]</strong> for registering for our <strong>Online Webinar</strong>. Your purchase confirmation and event details have been sent to your email address, <strong>[urlparam param="email1,Email1" default="Email address not found" /]</strong>. We look forward to seeing/hearing from you on the <strong>15<sup>th</sup> at 9:00am EST</strong>.
The default value in the shortcode is a nice feature because if the variable is not found in the query string, the default value will be displayed.
While working on this issue, I did learn that “name” (lower case) is a reserved word in WordPress which means WordPress blocks it (thanks earthtracker). Therefore using name in the query such as –
http://www.example.com/?name=Joe Smith&amp;email1=me@example.com
will generate a 404 error. If your thank you page is being redirected to a 404 error rather than rendering, you can prevent the block by adding the following line to your wp-config.php file.
unset($_GET['name']);
If you follow this link https://www.equalserving.com/test-thank-you-page/?Name=Joe%20Smith&email1=joe@example.com, you will see a demonstration of this explanation. Please notice the items in green font are retrieved from the query string.