<!DOCTYPE html>
<html lang="en">
<head>
	<title>Kids Mart - Baby Shop</title>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
	<link rel="icon" type="image/png" href="<?php echo e(asset('front/images/icons/favicon.png')); ?>"/>
	<link rel="stylesheet" type="text/css" href="<?php echo e(asset('front/vendor/bootstrap/css/bootstrap.min.css')); ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo e(asset('front/fonts/font-awesome-4.7.0/css/font-awesome.min.css')); ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo e(asset('front/fonts/themify/themify-icons.css')); ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo e(asset('front/fonts/Linearicons-Free-v1.0.0/icon-font.min.css')); ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo e(asset('front/fonts/elegant-font/html-css/style.css')); ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo e(asset('front/vendor/animate/animate.css')); ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo e(asset('front/vendor/css-hamburgers/hamburgers.min.css')); ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo e(asset('front/vendor/animsition/css/animsition.min.css')); ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo e(asset('front/vendor/select2/select2.min.css')); ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo e(asset('front/vendor/daterangepicker/daterangepicker.css')); ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo e(asset('front/vendor/slick/slick.css')); ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo e(asset('front/vendor/lightbox2/css/lightbox.min.css')); ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo e(asset('front/css/util.css')); ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo e(asset('front/css/main.css')); ?>">

  <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-notify/0.2.0/css/bootstrap-notify.min.css">
  <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-notify/0.2.0/css/styles/alert-bangtidy.min.css">
  <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-notify/0.2.0/css/styles/alert-blackgloss.min.css">


</head>
<body class="animsition">

	<!-- Header -->
	<?php echo View::make('frontview/inclu/header2'); ?>

	<!-- Title Page -->
	<section class="bg-title-page p-t-40 p-b-50 flex-col-c-m" style="background-image: url(<?php echo e(asset('front/images/cart.jpg')); ?>);">
		<h2 class="l-text2 t-center">
			Cart
		</h2>
	</section>

	<!-- Cart -->
	<section class="cart bgwhite p-t-70 p-b-100">
		<div class="container" id="divcart">
			<!-- Cart item -->
			<div class="container-table-cart pos-relative">
				<div class="wrap-table-shopping-cart bgwhite">
					<div class="emptycart"></div>
					<table class="table-shopping-cart cartmain">
						
					
						<!-- <tr class="table-row">
							<td class="column-1">
								<div class="cart-img-product b-rad-4 o-f-hidden">
								
									<img src="<?php echo e(asset('front/images/item-10.jpg')); ?>" alt="IMG-PRODUCT">
								
								
								
									
								</div>
							</td>
							<td class="column-2">gfhrfghfghfg</td>
							<td class="column-3 p-l-90">Rs.</td>
							<td class="column-4 p-l-90">
								<div class="flex-w bo5 of-hidden w-size17">
									<button class="btn-num-product-down color1 flex-c-m size7 bg8 eff2 cartqtychange" data-id=""><i class="fs-12 fa fa-minus" aria-hidden="true"></i></button>

									<input class="size8 m-text18 t-center num-product" type="number" id="num-product1" name="num-product1" value="">

									<button class="btn-num-product-up color1 flex-c-m size7 bg8 eff2 cartqtychange" data-id=""><i class="fs-12 fa fa-plus" aria-hidden="true"></i></button>
								</div>
							</td>
							<td class="column-5">Rs.</td>
							<td class="column-5">
								<button type="button" data-id="" class="close cartitemremove" aria-label="Close">
									<span aria-hidden="true">&times;</span>
								</button>
							</td>
						</tr>	 -->
						
					</table>
					
				</div>
			</div>
			<div class="cartbutton"></div>
			<!-- <div class="flex-w flex-sb-m p-t-25 p-b-25 bo8 p-l-35 p-r-60 p-lr-15-sm">
				<div class="flex-w flex-m w-full-sm">
					<div class="size12 trans-0-4 m-t-10 m-b-10 m-r-10">
						<a href="/" class="flex-c-m sizefull bg1 bo-rad-23 hov1 s-text1 trans-0-4" >Continue Shopping</a>
					</div>
				</div>

				<div class="size12 trans-0-4 m-t-10 m-b-10">
					<button class="flex-c-m sizefull bg1 bo-rad-23 hov1 s-text1 trans-0-4">Checkout</button>
				</div>
			</div>	 -->
		</div>
	</section>



	<!-- Footer -->
	<?php echo View::make('frontview/inclu/footer'); ?>
	
	<script type="text/javascript" src="<?php echo e(asset('front/vendor/jquery/jquery-3.2.1.min.js')); ?>"></script>
	<!-- <script type="text/javascript" src="//code.jquery.com/jquery-2.1.0.js"></script> -->

	<script type="text/javascript" src="<?php echo e(asset('front/vendor/animsition/js/animsition.min.js')); ?>"></script>
	<script type="text/javascript" src="<?php echo e(asset('front/vendor/bootstrap/js/popper.js')); ?>"></script>
	<script type="text/javascript" src="<?php echo e(asset('front/vendor/bootstrap/js/bootstrap.min.js')); ?>"></script>
	<script type="text/javascript" src="<?php echo e(asset('front/vendor/select2/select2.min.js')); ?>"></script>
	<script type="text/javascript">
		$(".selection-1").select2({
			minimumResultsForSearch: 20,
			dropdownParent: $('#dropDownSelect1')
		});
	</script>
	<script type="text/javascript" src="<?php echo e(asset('front/vendor/slick/slick.min.js')); ?>"></script>
	<script type="text/javascript" src="<?php echo e(asset('front/js/slick-custom.js')); ?>"></script>
	<script type="text/javascript" src="<?php echo e(asset('front/vendor/countdowntime/countdowntime.js')); ?>"></script>
	<script type="text/javascript" src="<?php echo e(asset('front/vendor/lightbox2/js/lightbox.min.js')); ?>"></script>
	<script type="text/javascript" src="<?php echo e(asset('front/vendor/sweetalert/sweetalert.min.js')); ?>"></script>

	  
  <!-- <script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> -->

  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-notify/0.2.0/js/bootstrap-notify.min.js"></script>

	<script type="text/javascript">
		$('.block2-btn-addcart').each(function(){
			var nameProduct = $(this).parent().parent().parent().find('.block2-name').html();
			$(this).on('click', function(){
				swal(nameProduct, "is added to cart !", "success");
			});
		});

		$('.block2-btn-addwishlist').each(function(){
			var nameProduct = $(this).parent().parent().parent().find('.block2-name').html();
			$(this).on('click', function(){
				swal(nameProduct, "is added to wishlist !", "success");
			});
		});
	</script>

	<script type="text/javascript" src="<?php echo e(asset('front/vendor/parallax100/parallax100.js')); ?>"></script>
	<script type="text/javascript">
        $('.parallax100').parallax100();
	</script>
	<script src="<?php echo e(asset('front/js/main.js')); ?>"></script>
	<div class='notifications top-right'></div>
</body>
</html>
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">


<script>
	
$(document).on('click', '.cartitemremove', function (e) {
    e.preventDefault();
    var id = $(this).data('id');
    var name = $(this).data('name');
    let ele = this;
	$.ajax({
		url: "<?php echo e(url('/deletecartitem')); ?>/"+id ,
		method: "POST",
		headers: {
			'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
		},
		cache: false,
		contentType: false,
		processData: false,
		dataType: 'JSON',
		data:{
			"id":id
		},
		success: function (result, code, ex) {
			// swal("Done!", "It was successfully!", "success");
			// $(ele).closest('tr').hide();
			// $( "#here" ).load(window.location.href + " #here" );
			loadCartData();
			$('.top-right').notify({message: {text: name+' is successfully deleted.'}}).show();
			// $( "#divcart" ).load(window.location.href + " #divcart" );
			// swal("Done!", "It was successfully deleted!", "success");
		},
		error: function (jqXHR, textStatus, errorThrown) {
			swal("Warning", "Unable to Process your request", "error");
		},
	});
});

$(document).on('click', '.cartqtychange', function (e) {
    e.preventDefault();
	
	var id = $(this).data('id');
	var name = $(this).data('name');

	var qty = document.getElementById('num-product'+id).value;
    let ele = this;
	$.ajax({
		url: "<?php echo e(url('qtychange/')); ?>/"+id ,
		type: "POST",
		headers: {
			'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
		},
		// cache: false,
		// contentType: false,
		// processData: false,
		// dataType: 'JSON',
		data:{
			get_id:id,
			get_qty:qty
		},
		success: function (result, code, ex) {
			loadCartData();
			// $( "#cartreload" ).load(window.location.href + "#cartreload" );
			// swal("Done!", "It was successfully!", "success");
			$('.top-right').notify({message: {text: name+' quantity updated.'}}).show();
			// $.notify({title: '<strong>Heads up!</strong>',message: 'Bootstrap Notify uses Bootstrap Info Alert styling as its default setting.'});
		},
		error: function (jqXHR, textStatus, errorThrown) {
			swal("Warning", "Unable to Process your request", "error");
		},
	});
});
</script>

