Skip to content

Commit

Permalink
#156 removed order completed signal in ThankYouView,
Browse files Browse the repository at this point in the history
because it is now sent by the API in confirm_payment,
also, we should not show an older order (the template should handle the case of no order)
  • Loading branch information
Ales Kocjancic committed Sep 12, 2012
1 parent 6591af6 commit d3bad93
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions shop/views/checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,9 @@ class ThankYouView(LoginMixin, ShopTemplateView):
def get_context_data(self, **kwargs):
ctx = super(ShopTemplateView, self).get_context_data(**kwargs)

# Set the order status:
# put the latest order in the context
order = get_order_from_request(self.request)
if order:
order.status = Order.COMPLETED
order.save()
completed.send(sender=self, order=order)
else:
order = Order.objects.get_latest_for_user(self.request.user)
#TODO: Is this ever the case?

ctx.update({'order': order, })

# Empty the customers basket, to reflect that the purchase was
Expand Down

0 comments on commit d3bad93

Please sign in to comment.