Created
August 26, 2011 12:53
-
-
Save slaskis/1173346 to your computer and use it in GitHub Desktop.
Spree Promo Multiple Automatic Promotions Bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In spree/promo/lib/spree_promo.rb | |
next if current_promotions.present? && !promotion.combine? | |
amount = promotion.calculator.compute(self).abs | |
amount = item_total if amount > item_total | |
- if amount > 0 | |
+ if amount > 0 && !promotion_credit_exists?(promotion) | |
self.promotion_credits.create( | |
:source => promotion, | |
:amount => -amount, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment