New Zenner
- Join Date:
- Nov 2008
- Posts:
- 33
- Plugin Contributions:
- 0
Affiliate program tpl_checkout_success_default issue
I am running Zen-Cart 1.38 with the cherry zen theme. I am currently trying to setup an affiliate program withe shareasale and their instructions want me to put their code in includes/templates/cherry_zen/templates/checkout success/tpl_footer.php
My template does not have this directory so I assume to create it I would have to tell the tpl_checkout_success_default to call this file if I manually create it. Instead I attempted to place their code in the tpl_checkout_success_default.php file. This kind of works as it does return some date to the site, but does not return the order total. I have posted their code below. It looks to me that they are using variables that are not defined or referenced in my php file. I'm not sure but that is an idea. Can anyone see why pasting the code in my checkout_success file wouldn't work or how I could fix it? Obviously I put my merchant number in instead of the xxx
<?php if (isset($zv_orders_id) && (int)$zv_orders_id > 0 && isset($order_summary) && is_array($order_summary)) { if (!isset($_SESSION['affiliate_order_id']) || $_SESSION['affiliate_order_id'] != $zv_orders_id ) { $_SESSION['affiliate_order_id'] = $zv_orders_id; $commissionable_order_formatted = number_format($order_summary['commissionable_order'], 2, '.', ''); echo '<img src="https://shareasale.com/sale.cfm?amount=' . $commissionable_order_formatted . '&tracking=' . $order_summary['order_number'] . '&transtype=sale&merchantID=XXXX" width="1" height="1">'; } } ?>