My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
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
Status:  Fixed
Owner:  ----
Closed:  Aug 2008


 
Reported by edmundo...@gmail.com, Jun 28, 2008
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

delete_previous_promotion_before_compare_minimum_cart_value.patch
1.3 KB   View   Download
Aug 11, 2008
Project Member #1 subim...@gmail.com
Seems to be fixed with all of my other changes this evening. Closing.
Status: Fixed
Aug 15, 2008
Project Member #2 subim...@gmail.com
Hrm...so this wasn't fixed with the applied patch? Can you check trunk please?
Status: Started
Aug 15, 2008
#3 edmundo...@gmail.com
???
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.
Aug 15, 2008
Project Member #4 subim...@gmail.com
Aha...makes sense. Fixed in r121
Status: Fixed

Powered by Google Project Hosting