Hide payment fees if they are all equal to 0.00

This commit is contained in:
Raphael Michel
2017-05-02 19:12:42 +02:00
parent 394c206133
commit 8294391ebc
3 changed files with 5 additions and 2 deletions

View File

@@ -381,6 +381,7 @@ class PaymentStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
def get_context_data(self, **kwargs):
ctx = super().get_context_data(**kwargs)
ctx['providers'] = self.provider_forms
ctx['show_fees'] = any(p['fee'] for p in self.provider_forms)
ctx['selected'] = self.request.POST.get('payment', self.request.session.get('payment', ''))
return ctx