The script requires values, such as taxes, which are not present on the order object alone. On this page, taxes are pulled through a separate control( OrderTotalSummary.ascx ), and I dont know how to access these values from a separate codefile.
The second problem I could use some help with is how to iteratively insert javascript with order item information inserted each cycle.
This is the code that needs to be used.
Code: Select all
<script language="javascript" type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxx-1");
pageTracker._trackPageview();
pageTracker._addTrans(
"order-id", // required
"affiliate or store name",
"total",
"tax",
"shipping",
"city",
"state",
"country"
);
pageTracker._addItem(
"order-id", // required
"SKU",
"product name",
"product category",
"unit price", // required
"quantity" //required
);
pageTracker._trackTrans();
</script>
For the second part, i dont know where to begin. Do I write a for loop in the codebehind and somehow inject the code? Do i use a javascript loop and pull the values sequentially for each item? Can C# and JS work together like this?
Any Advice would be appreciated.