From ecfd5e830f803cafa78bd2d3d14c616d9628e166 Mon Sep 17 00:00:00 2001 From: Yannis Rammos Date: Sun, 27 Oct 2019 19:04:32 +0200 Subject: [PATCH] Hide service price in modal views if equal to zero. --- src/assets/js/frontend_book.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/assets/js/frontend_book.js b/src/assets/js/frontend_book.js index 129b0f31..76fc6fe5 100644 --- a/src/assets/js/frontend_book.js +++ b/src/assets/js/frontend_book.js @@ -498,11 +498,11 @@ window.FrontendBook = window.FrontendBook || {}; } var selServiceId = $('#select-service').val(); - var servicePrice; - var serviceCurrency; + var servicePrice = ''; + var serviceCurrency = ''; $.each(GlobalVariables.availableServices, function (index, service) { - if (service.id == selServiceId) { + if (service.id == selServiceId && service.price != '' && service.price != null && service.price != '0.00' && service.price != '0,00') { servicePrice = '
' + service.price; serviceCurrency = service.currency; return false; // break loop @@ -677,7 +677,7 @@ window.FrontendBook = window.FrontendBook || {}; html += '[' + EALang.duration + ' ' + service.duration + ' ' + EALang.minutes + ']'; } - if (service.price != '' && service.price != null) { + if (service.price != '' && service.price != null && service.price != '0.00' && service.price != '0,00') { html += '[' + EALang.price + ' ' + service.price + ' ' + service.currency + ']'; }