Hello,
Im using Joomla 2.5.14 with Virtuemart 2, and VM affiliates.
I want to edit the following rule in controller.php:
(line 1433) $query = "UPDATE #__vm_affiliate SET `commissions` = `commissions` " . $operation . " " . $payment->amount . " WHERE `affiliate_id` = '" . $affiliateID . "'";
When a customer uses a coupon code trough an affiliate, I want this to be deducted from the commission of the affiliate. How do I change this rule, am I looking at the correct file? I was thinking of changing to something like:
$commissie = " . $payment->amount . "-final_discount;
$query = "UPDATE #__vm_affiliate SET `commissions` = `commissions` " . $operation . " " . $commissie . " WHERE `affiliate_id` = '" . $affiliateID . "'";
And what does the supplier of your affiliate component have to say about this? http://forum.virtuemart.net/index.php?topic=108212.0