def invoice_resend_email(request, order_id):
 try:
  order = Order.objects.get_for_user(order_id, request)
 except Order.DoesNotExist:
  raise Http404
 if (request.method == u'POST'):
  checkout.send_order_email(request, order)
  msg = _((u'The order email for order ID %s has been re-sent' % order_id))
  info(request, msg)
 redirect_to = next_url(request)
 if (redirect_to is None):
  if request.user.is_staff:
   redirect_to = reverse(u'admin:shop_order_change', args=[order_id])
  else:
   redirect_to = reverse(u'shop_order_history')
 return redirect(redirect_to)

def invoice_resend_email ( request , order_id ) : try : order = Order . objects . get_for_user ( order_id , request ) except Order . DoesNotExist : raise Http404 if ( request . method == u'POST' ) : checkout . send_order_email ( request , order ) msg = _ ( ( u'The order email for order ID %s has been re-sent' % order_id ) ) info ( request , msg ) redirect_to = next_url ( request ) if ( redirect_to is None ) : if request . user . is_staff : redirect_to = reverse ( u'admin:shop_order_change' , args = [ order_id ] ) else : redirect_to = reverse ( u'shop_order_history' ) return redirect ( redirect_to )
re-sends the order complete email for the given order and redirects to the previous page .