If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Bug Reports / Group Discounts

Group Discounts

Started by 2shediac on 18 Jan 2013, 9:53 PM · Views: 772

Results 1 to 2 of 2
18 Jan 2013, 9:53 PM
#1
2shediac avatar

2shediac

New Zenner

Join Date:
Nov 2011
Posts:
1
Plugin Contributions:
0

Post #1 by 2shediac

Hi found a possible problem - in ot_group_pricing.php, function calculate_deductions - the function does not take into account when more than 1 of the same item is purchased.

For example, the if an item is priced at $100 and the group discount is 10%, and 3 are purchased - the discount is only $10 instead of $30.

I have added in:
$qty = $value['qty'];

then down in the code.

$discount = ($totprice - $gift_vouchers) * $group_discount->fields['group_percentage'] / 100;
if ($qty > 1) {
$discount = $qty * $discount;
}

Not sure if anyone has come across this before...

19 Jan 2013, 11:27 PM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,762
Plugin Contributions:
56

Post #2 by swguy

I think your copy of group pricing might have been modified - a vanilla one from a fresh 1.3.9 download works perfectly.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.