CMS MADE SIMPLE FORGE

Orders

 

[#6131] bug - issue with discount for product in Order

avatar
Created By: marek a. (maranc)
Date Submitted: Fri Feb 18 12:49:52 -0500 2011

Assigned To: Robert Campbell (calguy1000)
Version: 1.11.2
CMSMS Version: None
Severity: None
Resolution: None
State: Open
Summary:
bug - issue with discount for product in Order
Detailed Description:
Orders module not showing best discount for each product in order (basket) but
highest discount from all discount calculeted for each product. Example we have
three promotions for three different product (condition: Require purchase of a
specific product, offer type: discount product by percentage).

We have sample produc in promotiont:
ID1 - price 1$, discount 0,10
ID2 - price 1$, discount 0.15
ID3 - price 1$, discount 0.05

If customer buy these three in order hi will see follow prices (after discount):
ID1 - 1$ (no discount)
ID2 - 0.85$ (discount 0.15$)
ID3 - 1$ (no discount)

For ID 1 i 3 we dont have any showing discount. It's looks that best discount in
this case is not used for ID of product, but is calculated from all products and
is used only for this product, whitch have best amount discount.

I dont think that problem is with module Promotion, because module Products
example show  correct discount value for each products.

In my opinion error is in class.order_maker.php, at line 233 is started function
protected function _adjust_line_items_for_discounts and I think that here is
problem. I'm not expert in php, but if some one can looks for this function ...

Marek A.




History