VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: fruitvlieg on February 09, 2014, 20:03:26 PM

Title: Edit mysql code in www/components/com_affiliate/controller.php
Post by: fruitvlieg on February 09, 2014, 20:03:26 PM
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 . "'";
Title: Re: Edit mysql code in www/components/com_affiliate/controller.php
Post by: jenkinhill on February 10, 2014, 00:30:46 AM
And what does the supplier of your affiliate component have to say about this?  http://forum.virtuemart.net/index.php?topic=108212.0