Hey,
I am currently setting up my website store using Zen Cart 1.38e and have installed JAM Affiliate Software and using the PayPal Express Checkout option only as a payment option. I have set up the cron jobs and they are working fine as i can tell (there is no error email being sent to my account).
As per normal Zen Cart check out operations, all my products except subscriptions go through the zen cart and paypal process fine. payment notifications and invoices get sent perfectly and all is well. the only problem is that the commissions are not getting registered with JAM. i have used the JAM and Zen Cart integration process by putting the footer code in the checkout_success folder of my custom template folder. footer code is as follows;
<?php
} // flag_disable_footer
##########################################
## START JAM INTEGRATION WITH ZEN CART ##
## ZC Integration code by DrByte 8/2006 ##
##########################################
if ((int)$orders_id > 0) {
$JAM = $db->Execute("select class, value from " . TABLE_ORDERS_TOTAL . " where orders_id = '".(int)$orders_id."' AND class in ('ot_coupon', 'ot_subtotal', 'ot_group_pricing')");
while (!$JAM->EOF) {
switch ($JAM->fields['class']) {
case 'ot_subtotal':
$order_subtotal = $JAM->fields['value'];
break;
case 'ot_coupon':
$coupon_amount = $JAM->fields['value'];
break;
case 'ot_group_pricing':
$group_pricing_amount = $JAM->fields['value'];
break;
}
$JAM->MoveNext();
}
$commissionable_order = ($order_subtotal - $coupon_amount - $group_pricing_amount);
$commissionable_order = number_format($commissionable_order,2,'.','');
echo "<script language=\"JavaScript\" type=\"text/javascript\" src=\"https://www.mydomainname.com/affiliates/sale.php?amount=$commissionable_order&trans_id=$orders_id\"></script></td></tr>
</table>";
}
#######################################
## END JAM INTEGRATION WITH ZEN CART ##
#######################################
?>
once payment is confirmed and paypal returns the customer to my site to the checkout_success page, i check the source code and JAM integration code reads as follows;
<script language="JavaScript" type="text/javascript" src="https://www.mydomainname.com/affiliates/sale.php?amount=52.24&trans_id=4565"></script></td></tr>
To me i think it should be registering the commissions but then i go and check the reports and only clicks have been registered and not commissions. can you please give me some insight on this matter....
also is there a way to set up subscriptions so that the affiliate can get paid for the subscription too. at the moment i have have a subscription button that takes the customer straight to the subscription paypal payment page and when the customer enters the payment details to paypal and the checkout is successful then the customer get taken back to a custom thank you page i have created.
Is there a way i can run the subscription through zen cart? i dont think i can. also should i be using the zen cart IPN header handler in the Paypal IPN URL in PayPal, or should i use the JAM affiliate URL? i am currently using the Zen Cart URL in the PayPal IPN URL.
I want to find out a way to track the commission earned on paypal subscriptions and if so if there is way to to track reoccurring subscription fees.
thank you very much for any assistance.
Bookmarks