Ver código fonte

Merge pull request #3996 from django-oscar/basket_voucher_from_voucherset_name

Use voucher_set name for vouchers in basket totals template
master
Voxin Muyli 2 anos atrás
pai
commit
ef4e0a511a
Nenhuma conta vinculada ao e-mail do autor do commit

+ 5
- 1
src/oscar/templates/oscar/basket/partials/basket_totals.html Ver arquivo

@@ -44,7 +44,11 @@
44 44
                             {% for discount in voucher_discounts %}
45 45
                                 <tr>
46 46
                                     <td>
47
-                                        {{ discount.voucher.name }} ({{ discount.voucher.code }})
47
+                                        {% if discount.voucher.voucher_set %}
48
+                                            {{ discount.voucher.voucher_set.name }} ({{ discount.voucher.code }})
49
+                                        {% else %}
50
+                                            {{ discount.voucher.name }} ({{ discount.voucher.code }})
51
+                                        {% endif %}
48 52
                                         {% if editable %}
49 53
                                             <form action="{% url 'basket:vouchers-remove' pk=discount.voucher.id %}" method="POST">
50 54
                                                 {% csrf_token %}

Carregando…
Cancelar
Salvar