If you create a discount with the apply a discount action and set it to add for order products
the discount works if you have one of the product but if you have more then one of the same
product on the order it only give a discount for one of them, not all occurrences of that product.

Seeing as it is possible to checkout when you have the same product on multiple lines this should be fixed.

Comments

agileware’s picture

Status: Active » Needs review
StatusFileSize
new2.6 KB

Here is a patch that fixes this problem.

It also addresses what seems to be a typo in the uc_discount_line_items_discount() function
where it calculates the total from the discount line item. (It was using a variable that didn't exist)

agileware’s picture

StatusFileSize
new3.03 KB

Here is another version of the same patch that applies if you have already
applied the patch in #597992: Discount not reflected on total order (FIXED for Trigger: Calculate order discounts) at #8.