Skip to content

Commit

Permalink
Merge pull request #770 from abhishek-webkul/gli-1218
Browse files Browse the repository at this point in the history
Disable cart popup button on admin Book Now page if cart is empty
  • Loading branch information
rohit053 authored Dec 28, 2023
2 parents b2d8aa4 + 3e7bc6b commit 0fc5b7e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
<div class="panel">
<div class="panel-heading">
<i class="icon-info"></i> {if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}{l s='Booking Calender' mod='hotelreservationsystem'}{else}{l s='Service Products' mod='hotelreservationsystem'}{/if }
<button type="button" class="btn btn-primary" id="cart_btn" data-toggle="modal" data-target="#cartModal"><i class="icon-shopping-cart"></i> {l s='Cart' mod='hotelreservationsystem'} <span class="badge" id="cart_record">{$total_products_in_cart}</span></button>
<button type="button" class="btn btn-primary {if $total_products_in_cart|intval == 0}disabled{/if}" id="cart_btn" data-toggle="modal" data-target="#cartModal"><i class="icon-shopping-cart"></i> {l s='Cart' mod='hotelreservationsystem'} <span class="badge" id="cart_record">{$total_products_in_cart}</span></button>
</div>
{if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}
<div id='fullcalendar'></div>
Expand Down

0 comments on commit 0fc5b7e

Please sign in to comment.