Zen Cart Logo
Forums / Bug Reports / Discount Qty Applies to Mixed Attributes doesn't work

Discount Qty Applies to Mixed Attributes doesn't work

Views: 1,752

Results 1 to 4 of 4
18 Sep 2024, 01:46
#1
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Discount Qty Applies to Mixed Attributes doesn't work

Just noticed the "Discount Qty Applies to Mixed Attributes" function doesn't work in v1.5.8a

Either "Yes" or "No" gives me the same incorrect result (no discount qty applied). I tested with PHP 7.4 and 8.0, but still didn't get the correct amount. Is there any possible setting conflict?

Attachment 20754

18 Sep 2024, 10:13
#2
swguy avatar

swguy

Administrator

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

Re: Discount Qty Applies to Mixed Attributes doesn't work

This works in master. Not sure if it was fixed in 2.0.x or 2.1.0.

18 Sep 2024, 10:41
#3
swguy avatar

swguy

Administrator

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

Re: Discount Qty Applies to Mixed Attributes doesn't work

Looks good in 2.0.1 as well.

22 Sep 2024, 04:04
#4
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Re: Discount Qty Applies to Mixed Attributes doesn't work

It looks like a similar issue from https://www.zen-cart.com/showthread.php?230034-Products-Price-Manager-discounts-aren-t-working-on-multiple-attributes-even-though-th

So I copy the following codes (from v2.0.1) to \includes\functions\functions_price.php and insert between line 1417 and 1418:

if (IS_ADMIN_FLAG === false) {
$new_qty = $_SESSION['cart']->in_cart_mixed_discount_quantity($product_id);
// check for discount qty mix
if ($new_qty > $check_qty) {
$check_qty = $new_qty;
}
}

So far it works fine, and no error logs generated.
I would appreciate it if anyone could look into and verify my modification.