Variables available for javascript...

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
mxr64k
Ensign (ENS)
Ensign (ENS)
Posts: 1
Joined: Thu Oct 23, 2008 2:02 pm

Variables available for javascript...

Post by mxr64k » Thu Oct 23, 2008 2:09 pm

Hi everyone... I'm a newb to AbleCommerce so please bear with me..

My client is having problems getting a hit counter working on one of the pages: Receipt Page

We have placed the correct javascript code in the Content section (Admin | Website | Content and Layout | Edit Scriptlet)

It is rendered on the page correctly and is picked up by our hit counter host.

My problem is we need to send the OrderID and Total Charges values in our code...

Basically what we have is:

document.write('<IMG src="https://hitcounterhost/' +
'confirmation.asp?acct=testaccount' +
'&type=125147' +
'&s=214'+
'&uniqueId=' + ordId +
'&orderAmount=' + orderAmt + '"' +
' height=1 width=1 border=0>');

I need to populate ordID and orderAmt.... how can I do that?

Thanks for your help!
Todd

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Variables available for javascript...

Post by mazhar » Fri Oct 24, 2008 5:05 am

You need to write some server side code that dynamically build this javascript then inject the created javascript in the page. There is a good example in the application take a look at the ConLib/GoogleAnalyticsWidget control.

Post Reply