Shahidplayer@gmail.com
+91 95355 05584
0
Home
Products
About
Shop
Blogs
Contact
Pages
Chefs
Testimonials
Privacy Policy
Trams and Conditions
search
0
0
reservation
total item (
0
)
sub total
Rs.0
view cart
Book a Table
select time
book table
Shop
home
Shop
All
Burger
Sandwich
Rolls
Pizza
Beverage
Momos
Fries
Twistato
Ice Cream
Nuggets
Crispy Chicken
Vada Pav
Mocktail
search
Thumbnail
Title
Price
Action
Lemon Masala
Rs.15
baby corn cheese pizza
Rs.110
Chicken Cheeze Pizza
Rs.140
Double Cheeze Pizza
Rs.140
Onion Cheeze Pizza
Rs.90
Tomato Cheeze Pizza
Rs.90
Capsicum cheese pizza
Rs.90
Corn cheese pizza
Rs.110
Paneer Cheese Pizza
Rs.130
Veg Cheese Pizza
Rs.100
Double cheese vada pav
Rs.80
Cheese Vada Pav
Rs.40
User Crispy Chicken Sandwich
Rs.80
Chocolate Sandwich
Rs.60
Cheese Loaded Sandwich
Rs.70
Paneer Cheese Sandwich
Rs.70
corn cheese sandwich
Rs.60
veg cheese sandwich
Rs.50
Paneer Momos
Rs.90
Chicken Momos
Rs.80
Corn and Cheese Momos
Rs.80
Veg Momos
Rs.60
Chicken Popcorn
Rs.80
Crispy Chicken Breast Strip
Rs.90
Crispy Chicken Wings
Rs.90
Chicken Fries Burger
Rs.90
Crispy Chicken Burger
Rs.110
Chicken Burger
Rs.90
Paneer Cheese Burger
Rs.110
Corn Cheese Burger
Rs.80
Veg Fries Burger
Rs.75
Twistato with Peri Peri
Rs.50
Chicken Roll
Rs.95
Paneer Fried Roll
Rs.85
Veg Fried Roll
Rs.70
Smiley
Rs.60
Potato Wedges Fries
Rs.60
Veg Cheeze Burger
Rs.70
American Salt Sprinkle Fries
Rs.60
American Peri Peri Sprinkle Fries
Rs.70
Regular Salt Fries
Rs.50
Regular Peri Peri Fries
Rs.60
Masala Fries
Rs.80
Chicken Fries
Rs.110
chicken nuggets
Rs.80
cheese triangle nuggets
Rs.60
Chilli Garlic Potato Pops
Rs.60
Total Amout :
0
Order Now
go to top
$(document).ready(function(){ $('input[name="product_size"]').on('change', function(){ updateTotalPrice(); }); $('input[name="product_option[]"]').on('change', function(){ updateTotalPrice(); }); // Event handlers for increment and decrement buttons $('.increment').on('click', function(e){ e.preventDefault() let quantity = $('#quantity'); let currentQuantity = parseFloat(quantity.val()); quantity.val(currentQuantity + 1); updateTotalPrice() }) $('.decrement').on('click', function(e){ e.preventDefault() let quantity = $('#quantity'); let currentQuantity = parseFloat(quantity.val()); if(currentQuantity > 1){ quantity.val(currentQuantity - 1); updateTotalPrice() } }) // Function to update the total price base on seelected options function updateTotalPrice() { let basePrice = parseFloat($('input[name="base_price"]').val()); let selectedSizePrice = 0; let selectedOptionsPrice = 0; let quantity = parseFloat($('#quantity').val()); // Calculate the selected size price let selectedSize = $('input[name="product_size"]:checked'); if(selectedSize.length > 0){ selectedSizePrice = parseFloat(selectedSize.data("price")); } // Calculate selected options price let selectedOptions = $('input[name="product_option[]"]:checked'); $(selectedOptions).each(function(){ selectedOptionsPrice += parseFloat($(this).data("price")); }) // Calculate the total price let totalPrice = (basePrice + selectedSizePrice + selectedOptionsPrice) * quantity; $('#total_price').text("Rs." + totalPrice); } // Add to cart function $("#modal_add_to_cart_form").on('submit', function(e){ e.preventDefault(); // Validation let selectedSize = $("input[name='product_size']"); if(selectedSize.length > 0){ if($("input[name='product_size']:checked").val() === undefined){ toastr.error('Please select a size'); console.error('Please select a size'); return; } } let formData = $(this).serialize(); $.ajax({ method: 'POST', url: 'https://sheikhscafe.com/add-to-cart', data: formData, beforeSend: function(){ $('.modal_cart_button').attr('disabled', true); $('.modal_cart_button').html('
Loading...'); }, success: function(response){ updateSidebarCart(); toastr.success(response.message); let row = $('#shop-table').find('tr[data-product-id="' + response.productId + '"]'); // Replace the
tag with the quantity buttons row.find('td:last-child').html(`
`); let modalElement = document.getElementById('cartModal'); let modal = bootstrap.Modal.getInstance(modalElement); // Get the Bootstrap modal instance if (modal) { modal.hide(); // Hide the modal $(modalElement).on('hidden.bs.modal', function (e) { modal.dispose(); // Dispose of the modal instance }); } else { // Fallback in case modal instance is not found $('#cartModal').modal('hide'); } }, error: function(xhr, status, error){ let errorMessage = xhr.responseJSON.message; toastr.error(errorMessage); if (errorMessage === "Unauthenticated.") { window.location.href = "https://sheikhscafe.com/login"; } }, complete: function(){ $('.modal_cart_button').html('Add to Cart'); $('.modal_cart_button').attr('disabled', false); } }) }) var cartTotal = parseInt("0"); $('.increment').on('click', function() { let inputField = $(this).siblings(".quantity"); let currentValue = parseInt(inputField.val()); let rowId = inputField.data("id"); inputField.val(currentValue + 1); cartQtyUpdate(rowId, inputField.val(), function(response) { if (response.status === 'success') { inputField.val(response.qty); let productTotal = response.product_total; inputField.closest("tr") .find(".produt_cart_total") .text("Rs.:productTotal" .replace(":productTotal", productTotal)); cartTotal = response.cart_total; $('#subtotal').text("Rs." + cartTotal); $("#final_total").text("Rs." + response.grand_cart_total) } else if (response.status === 'error') { let errorMessage = xhr.responseJSON.message; inputField.val(response.qty); toastr.error(response.message); if (response.message === "Unauthenticated.") { window.location.href = "https://sheikhscafe.com/login"; } } }); }); $('.decrement').on('click', function() { let inputField = $(this).siblings(".quantity"); let currentValue = parseInt(inputField.val()); let rowId = inputField.data("id"); inputField.val(currentValue - 1); if (inputField.val() > 1) { cartQtyUpdate(rowId, inputField.val(), function(response) { if (response.status === 'success') { inputField.val(response.qty); let productTotal = response.product_total; inputField.closest("tr") .find(".produt_cart_total") .text("Rs.:productTotal" .replace(":productTotal", productTotal)); cartTotal = response.cart_total; $('#subtotal').text("Rs." + cartTotal); $("#final_total").text("Rs." + response.grand_cart_total) } else if (response.error === 'error') { let errorMessage = xhr.responseJSON.message; inputField.val(response.qty); toastr.error(response.message); if (errorMessage === "Unauthenticated.") { window.location.href = "https://sheikhscafe.com/login"; } } }); } }); function cartQtyUpdate(rowId, qty, callback) { $.ajax({ method: 'post', url: 'https://sheikhscafe.com/cart-update-qty', data: { 'rowId': rowId, 'qty': qty }, beforeSend: function() { showLoader(); }, success: function(response) { if (callback && typeof callback === 'function') { callback(response); } }, error: function(xhr, status, error) { let errorMessage = xhr.responseJSON.message; hideLoader(); toastr.error(errorMessage); }, complete: function() { hideLoader(); } }) } })