From 88d414360d80d49fd606b082ceebca5076073c34 Mon Sep 17 00:00:00 2001 From: Vaidas Lungis Date: Tue, 27 Jan 2015 16:53:16 +0200 Subject: [PATCH] Do not show payment gateways when client has enough in account balance --- .../Orderbutton/html_client/mod_orderbutton_checkout.phtml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bb-modules/Orderbutton/html_client/mod_orderbutton_checkout.phtml b/src/bb-modules/Orderbutton/html_client/mod_orderbutton_checkout.phtml index 03ac9643c..447e4d517 100644 --- a/src/bb-modules/Orderbutton/html_client/mod_orderbutton_checkout.phtml +++ b/src/bb-modules/Orderbutton/html_client/mod_orderbutton_checkout.phtml @@ -154,7 +154,8 @@
- {% if cart.total %} + {% set enough_in_balance = client.client_balance_get_total > cart.total %} + {% if cart.total and not enough_in_balance %}
{% for gtw in guest.invoice_gateways %} {% if cart.currency.code in gtw.accepted_currencies %} @@ -168,6 +169,9 @@ {% endif %}
+ {% if enough_in_balance %} +

{% trans 'Total amount will be deducted from account balance' %}

+ {% endif %}