From 3e7bc6b9969c0edb5e7e84904c4259bc0149ad16 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 8 Aug 2023 12:10:32 +0530 Subject: [PATCH] Disable cart popup options at back office if not useful --- .../views/js/admin/hotel_rooms_booking.js | 6 ++++++ .../admin/hotel_rooms_booking/helpers/view/view.tpl | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js b/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js index d02a0b756..722661361 100644 --- a/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js +++ b/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js @@ -869,6 +869,12 @@ $(document).ready(function() { $("#cartModal").html(result.cart_content); } $("#cart_record").html(result.total_products_in_cart); + + if (parseInt(result.total_products_in_cart) > 0) { + $('#cart_record').closest('button').removeClass('disabled'); + } else { + $('#cart_record').closest('button').addClass('disabled'); + } } } }); diff --git a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/view.tpl b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/view.tpl index 936793a14..4c54fdddd 100644 --- a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/view.tpl +++ b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/view.tpl @@ -188,7 +188,7 @@
{if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}{l s='Booking Calender' mod='hotelreservationsystem'}{else}{l s='Service Products' mod='hotelreservationsystem'}{/if } - +
{if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}