Help with Code to get Variables for Third Party Platforms

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Help with Code to get Variables for Third Party Platforms

Post by kwikstand » Sat Jan 06, 2018 12:21 pm

I have been trying to get variables such as customer email and name to populate for third part platforms such as Shopping Reviews and Remarketing. So far I've got things like Product Id and Order Number, but I still need the email and Name.

I am currently needing this on the Receipt.aspx page.

For example; here is the code required for ShopperApproved:

Code: Select all

<script type="text/javascript"> var sa_values = { "site":XXX, "token":"XXX", '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/26879.js"); else saLoadScript("//direct.shopperapproved.com/thankyou/rate/26879.js?d=" + d.getTime()); </script>
It is needing the 'orderid', 'name' and 'email'.

Adroll Remarketing also also needs the email in their code.

Any help with this would be appreciated. Thanks,

Scott
Contractor's Solutions
www. contractors-solutions.net

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: Help with Code to get Variables for Third Party Platforms

Post by kwikstand » Mon Jan 08, 2018 4:19 pm

Is it "BillToEmail" that is needed to get the email address?
Contractor's Solutions
www. contractors-solutions.net

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Help with Code to get Variables for Third Party Platforms

Post by jmestep » Mon Jan 08, 2018 10:53 pm

Yes, it should be BillToEmail
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: Help with Code to get Variables for Third Party Platforms

Post by kwikstand » Tue Jan 09, 2018 1:49 am

OK, thanks for that bit of info. What I need is the code to get that. I have been trying over and over using BillToEmail, but I crash the page. Does the Checkout/Receipt.aspx.cs need to be edited?

Thanks,

Scott
Contractor's Solutions
www. contractors-solutions.net

kwikstand
Commodore (COMO)
Commodore (COMO)
Posts: 410
Joined: Mon Feb 19, 2007 8:12 pm
Contact:

Re: Help with Code to get Variables for Third Party Platforms

Post by kwikstand » Tue Jan 09, 2018 1:34 pm

Here is the code Shopper Approved needs for Merchant Reviews the Receipt page:

Code: Select all

<script type="text/javascript"> var sa_values = { "site":26879, "token":"916h3sNg", 'orderid':'ORDER123', 'name':'John Doe', [color=#FF4000]'email'[/color]:'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/26879.js"); else saLoadScript("//direct.shopperapproved.com/thankyou/rate/26879.js?d=" + d.getTime()); </script>
You can see they are looking for 'orderid', 'name' and 'email'

This is what they need for Product Reviews on the Product Page:

Code: Select all

<script type="text/javascript"> var sa_products_count = 3; var sa_date_format = 'F j, Y'; var sa_product = '[PRODUCT ID]'; (function(w,d,t,f,o,s,a){ o = 'shopperapproved'; if (!w[o]) { w[o] = function() { (w[o].arg = w[o].arg || []).push(arguments) }; s=d.createElement(t), a=d.getElementsByTagName(t)[0];s.async=1;s.src=f;a.parentNode.insertBefore(s,a)} })(window,document,'script','//www.shopperapproved.com/product/26879/'+sa_product+'.js'); </script> <div id="shopper_review_page"><div id="review_header"></div><div id="product_page"></div><div id="review_image"><a href="https://www.shopperapproved.com/reviews/contractors-solutions.net/" onclick="var nonwin=navigator.appName!='Microsoft Internet Explorer'?'yes':'no'; var certheight=screen.availHeight-90; window.open(this.href,'shopperapproved','location='+nonwin+',scrollbars=yes,width=620,height='+certheight+',menubar=no,toolbar=no'); return false;" target="_blank" rel="nofollow"></a></div></div>
Here on the Product Page, they need [PRODUCT ID]

Does any body know how to do this?

Any help would be greatly appreciated.
Contractor's Solutions
www. contractors-solutions.net

Post Reply