Populating Variables for Follow-Up Survey

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
jill224
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 23
Joined: Sat Aug 22, 2009 3:19 pm
Location: Northaeast Pennsylvania

Populating Variables for Follow-Up Survey

Post by jill224 » Wed Oct 11, 2017 8:19 am

Hi all,

We are working with a third-party review company and are trying to add a feature on the Receipt Page that will allow them the ability to send follow-up review survey emails to our customers. They have provided the basic code below to be inserted on the receipt page, but I am looking for some help in figuring out what else needs to be done to allow these necessary variables to populate correctly based on the customer's order information. The variables we need filled in are Order ID, Name and email address. Any help or direction is much appreciated. Thank you!

---------------------

Code: Select all

<script type="text/javascript"> var sa_values = { "site":***, "token":"***", 'orderid':'ORDER123', 'name':'John Doe', 'email':'john.doe@gmail.com' }; function saLoadScript(src) { var js = window.document.createElement("script"); js.src = src; js.type = "text/javascript"; document.getElementsByTagName("head")[0].appendChild(js); } var d = new Date(); if (d.getTime() - 172800000 > 1477399567000) saLoadScript("//www.shopperapproved.com/thankyou/rate/***.js"); else saLoadScript("//direct.shopperapproved.com/thankyou/rate/***.js?d=" + d.getTime()); </script>

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Populating Variables for Follow-Up Survey

Post by Katie » Wed Oct 11, 2017 11:44 am

Hello,

I recalled one of our developers providing a nice sample of code that could be used to do something like this, but once I found it, then I realized that the person who made the original post was you!

This is the post I'm referring to -
viewtopic.php?f=65&t=18974&p=83573&hili ... les#p83573

Will this help get you pointed in the right direction?

Thanks
Katie
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

jill224
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 23
Joined: Sat Aug 22, 2009 3:19 pm
Location: Northaeast Pennsylvania

Re: Populating Variables for Follow-Up Survey

Post by jill224 » Wed Oct 11, 2017 11:53 am

Hi Katie,

Thanks for your help! Yes, I understand that the solution will be along these lines but I am not sure how to write the code that will populate these different variables for order id, name and email address. This code was used to populate product information and I am by no means an expert so I was unsure how to modify it to populate these new order-related variables.

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Populating Variables for Follow-Up Survey

Post by AbleMods » Fri Oct 13, 2017 2:23 am

Jill, I'll make the changes for you. They are simple once you know the trick, and then you'll have a working example to compare against in the future. Just a little tricky to try and document here in the forums, otherwise I'd post it here for everyone.

Shoot me a PM and I'll get you my email address so you can send over your receiptpage.aspx and .cs files.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply