I'm trying to integrate 3rd party affiliate tracking software "Post Affiliate Pro 3". The software itself is great, however their support consists of deflecting me back to my shopping cart provider for assistance with integration.
This software uses a small javascript placed on the order confirmation page to track sales figures for calculating commissions. I'm trying to make use of ORDERSUBTOTAL and ORDERNUMBER.
Here is the Javascript that I need to update to work with ASPDNSF (ML 7.0.2.1)
Code:
<script id="pap3" src="http://www.yoursite.com/affiliate/scripts/sale.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
var TotalCost="XXXXXX.XX";
var OrderID="XXXXXX";
var ProductID="XXXXXX";
papSale();
--></script>
Here is what I have done so far, (which is not working)
1. I Created new Topic "Pap3TrackingCode" which contains the javascript (attempting to call the variables for Subtotal and Order Number.)
Code:
<script id="pap3" src="http://www.yoursite.com/affiliate/scripts/sale.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
var TotalCost="OrderSubtotal";
var OrderID="OrderNumber";
var ProductID="";
papSale();
--></script>
2. I Added code to OrderConfirmation.aspx.cs to reference the Topic, using GeneralTrackingCode block as a guide, and placed immediately below it.
Code:
Topic Pap3TrackingCode = new Topic("Pap3TrackingCode");
if (Pap3TrackingCode.Contents.Length != 0)
{
writer.Write(Pap3TrackingCode.Contents.Replace("(!ORDERSUBTOTAL!)", Localization.CurrencyStringForGatewayWithoutExchangeRate(ord.Total(true))).Replace("(!ORDERNUMBER!)", OrderNumber.ToString()));
}
The ordersubtotal and ordernumber variables are NOT being passed thru to the affiliate db. I'd really appreciate some assistance from staff or anyone with some insight or experience at this, or notice some error with my feable attempt.
Thank you!
-Brian