Hello,
I just figured out that Opencart (vers 2) doesn't calculate the discount coupon when applying the affiliate commission...
So for example, if the item price is $100 and the customer applies a discount coupon of $20, the affiliate commission is calculated on $100 and not $80!
How can I change this?
I found this solution but is related to OC 1.5 and also It is not indicated where is located the file that I have to modify..?
viewtopic.php?t=122279
Thanks in advance for any help!
catalog/controller/checkout/confirm.php
And try this code
Code: Select all
$aff_total = $total;
foreach($taxes as $_v) {
$aff_total -= $_v;
}
$order_data['commission'] = ($aff_total / 100) * $affiliate_info['commission'];
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
Hi, Thanks for the help!
In this old post (related to OC 1.5) they indicate this modification as working:
$data['commission'] = ($total / 100) * $affiliate_info['commission'];
Do you It is better "$total" or "$aff_total" as you have indicated?
Thanks
In this old post (related to OC 1.5) they indicate this modification as working:
$data['commission'] = ($total / 100) * $affiliate_info['commission'];
Do you It is better "$total" or "$aff_total" as you have indicated?
Thanks
Who is online
Users browsing this forum: No registered users and 19 guests