Skip to content

Commit

Permalink
Fix for showing discount on product box
Browse files Browse the repository at this point in the history
Fixes issues with discount percentage. Original code
will cause TypeError: bad operand type for unary -: 'unicode'.
  • Loading branch information
tulimaki committed Aug 28, 2016
1 parent 220235e commit 63ffb53
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
{% if product|is_discounted %}
<div class="labels">
{% set discount_percent = product|discount_percent %}
<span class="sale-badge">{{ -discount_percent }}</span>
<span class="sale-badge">-{{ discount_percent }}</span>
</div>
{% endif %}
{% if show_image %}
Expand Down

0 comments on commit 63ffb53

Please sign in to comment.