@extends('general.head')
@section('middle')
<head>
<title>@section('title', 'Cart-')Ckgroceries</title>
<meta name="keywords" content=" online shoping, Best e-commerce site, online groceresie products" />
</head>
<div class="page-head_agile_info_w3l">
</div>
<!-- //banner-2 -->
<!-- page -->
<div class="services-breadcrumb">
<div class="agile_inner_breadcrumb">
<div class="container">
<ul class="w3_short">
<li>
<a href="index.html">Home</a>
<i>|</i>
</li>
<li>Your cart</li>
</ul>
</div>
</div>
</div>
<!-- //page -->
<!-- Single Page -->
<div class="banner-bootom-w3-agileits">
<div class="container">
<!-- tittle heading -->
<h3 class="tittle-w3l">Cart
<span class="heading-style">
<i></i>
<i></i>
<i></i>
</span>
</h3>
<!-- //tittle heading -->
<div class="checkout-right">
<style>
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
opacity: 1;
}
</style>
<div class="table-responsive">
@if($count>0)
<h4>Your shopping cart contains:
<span>{{ $count }} Products</span>
</h4>
<table class="timetable_sub">
<thead>
<tr>
<th>SL No.</th>
<th>Product</th>
<th>Product Name</th>
<th>Quality</th>
<th>Price</th>
<th>Total</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $subtotal=0; ?>
<?php $count=0; ?>
<?php $serial=1; ?>
@foreach($cart_products as $cart)
@if(count($cart)>0)
<?php $count=$count+1; ?>
@foreach($cart as $subcart)
<form action="{{ url('update_cart') }}" method="get" novalidate="">
<input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
<tr class="rem1">
<td class="invert">{{ $serial }}</td>
<?php $serial=$serial+1; ?>
<td class="invert-image">
<a href="single2.html">
@php
$check = DB::table('product_images')->where('product_id',$subcart['product_id'])->take(1)->get();
@endphp
@if(count($check)>0)
<img style="height: 100px; width: 100px" src="{{ url('public/uploads/products') }}/{{ $check[0]->image_name }}" alt=" " class="img-responsive">
@endif
</a>
</td>
<td class="invert">
@php
$check = DB::table('products')->where('product_id',$subcart['product_id'])->get();
@endphp
@if(count($check)>0)
{{ $check[0]->name }} ({{ $subcart['secondquantity'] }}{{ $subcart['unit'] }})
@endif
</td>
<td class="invert">
<div class="quantity">
<input type="hidden" name="product_id[]" value="{{ $subcart['product_id'] }}">
<input type="hidden" name="size[]" value="{{ $subcart['secondquantity'] }}{{ $subcart['unit'] }}">
<input type="number" class="form-control" style="max-width: 100px; background: white; color: #000000" name="quantity[]" id="updates_large_{{ $count }}" value="{{ $subcart['quantity'] }}" min="1">
</div>
</td>
<td class="invert">£{{ $subcart['amount'] }}</td>
<?php $total=$subcart['amount']*$subcart['quantity'] ?>
<?php $subtotal=$subtotal+$total ?>
<td class="invert">£<?php echo number_format((float)$total, 2, '.', ''); ?></td>
<td class="invert">
<div class="rem">
<a href="{{ url('removecartproduct') }}/{{ $subcart['product_id'] }}/{{ $subcart['secondquantity'] }}{{ $subcart['unit'] }}">
<div class="close1">
</div>
</a>
</div>
</td>
</tr>
@endforeach
@endif
@endforeach
<tr>
<td colspan="5"></td>
<input type="hidden" name="subtotal" value="{{ $subtotal }}">
<td><span style="font-weight: bold; font-size: 20px">£<?php echo number_format((float)$subtotal, 2, '.', ''); ?></span></td>
<td>
<button type="submit" class="btn btn-primary">Update Cart</button><br><br>
<a href="{{ url('empty_cart') }}" class="btn btn-danger">Empty Cart</a>
</td>
</tr>
</tbody>
</table>
@else
<div class="empty-page-content text-center">
<p class="cart--empty-message">Your cart is currently empty.</p>
<div class="cookie-message">
<p>Enable cookies to use the shopping cart</p>
</div>
<a href="{{ url('/') }}" class="btn btn--has-icon-after cart__continue-btn">Continue shopping</a>
</div>
@endif
</div>
</div>
@if($count>0)
<div class="checkout-left">
<div class="address_form_agile">
<div class="checkout-right-basket">
<input value="checkout" type="submit" name="update" style=" padding: 12px 25px;
color: #fff;
font-size: 16px;
background: #000;
text-decoration: none;
letter-spacing: 1px;
display: inline-block;">
<!-- <a href="{{ url('checkout') }}">Check Out-->
<!-- <span class="fa fa-hand-o-right" aria-hidden="true"></span>-->
<!-- </a>-->
</div>
</div>
<div class="clearfix"> </div>
</div>
</div>
@endif
</form>
</div>
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
@endsection
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]