| Issue 103: | PATCH Delete previous promotion before compare minimum cart value | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? 1. Checkout adding a percentage rebate. 2. Go back, and checkout using a fixed rebate that needs a minimum cart value. What is the expected output? What do you see instead? It should apply the promotion. It doesn't as the cart value is lower because of the old promotion. What version of the product are you using? On what operating system? trunk. Ubuntu 7.10
Aug 11, 2008
Project Member
#1
subim...@gmail.com
Status:
Fixed
Aug 15, 2008
Hrm...so this wasn't fixed with the applied patch? Can you check trunk please?
Status:
Started
Aug 15, 2008
???
This patch desn't seems to have been applied.
In the order model, set_promo_code, instead of:
...
# Make sure it's valid to add
if promo.minimum_cart_value
return if promo.minimum_cart_value > self.line_items_total
end
logger.info "PROMO MIN CART VALUE PASSED"
# Don't allow more than one promotion?
# This destroys any line items created previously.
self.order_line_items.delete(self.promotion_line_item) if self.promotion_line_item
...
do:
...
# Don't allow more than one promotion?
# This destroys any line items created previously.
self.order_line_items.delete(self.promotion_line_item) if self.promotion_line_item
# Make sure it's valid to add
if promo.minimum_cart_value
return if promo.minimum_cart_value > self.line_items_total
end
logger.info "PROMO MIN CART VALUE PASSED"
...
First delete the promotion line item, then make the comparison or it will be included
in the sum.
It is still wrong in trunk.
|