Skip to content

Commit

Permalink
Test if offer is applied before showing upsell msg
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad Abbas committed May 28, 2013
1 parent 7dae34e commit f4af3f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion oscar/apps/basket/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ def get_basket_warnings(self, basket):

def get_upsell_messages(self, basket):
offers = Applicator().get_offers(self.request, basket)
applied_offers = basket.offer_applications.offers.values()
msgs = []
for offer in offers:
if offer.is_condition_partially_satisfied(basket):
if offer.is_condition_partially_satisfied(basket) and offer not in applied_offers:
data = {
'message': offer.get_upsell_message(basket),
'offer': offer}
Expand Down

0 comments on commit f4af3f0

Please sign in to comment.