diff --git a/src/templates/checkout/payment.twig b/src/templates/checkout/payment.twig index 0559870..0037009 100644 --- a/src/templates/checkout/payment.twig +++ b/src/templates/checkout/payment.twig @@ -254,7 +254,7 @@
{% if voucherCodes|length == 1 %} {% set currentAmount = craft.giftVoucher.codes().codeKey(voucherCodes[0]).one().currentAmount %} - {% set appliedAmount = (cart.storedItemTotal - currentAmount) <= 0 ? currentAmount - cart.storedItemTotal : currentAmount %} + {% set appliedAmount = cart.storedItemTotal < currentAmount ? cart.storedItemTotal : currentAmount %}

{{ 'Gift cards currently applied to your order'|t('foster-checkout') }}: {{ voucherCodes[0] }} ({{ appliedAmount | currency }})