146 lines
6.2 KiB
PHP
146 lines
6.2 KiB
PHP
<x-header />
|
|
|
|
<!-- Breadcrumb Section Begin -->
|
|
<section class="breadcrumb-option">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<div class="breadcrumb__text">
|
|
<h4>Shopping Cart</h4>
|
|
<div class="breadcrumb__links">
|
|
<a href="{{ url::to('/') }}">Home</a>
|
|
<a href="{{ url::to('shop') }}">Shop</a>
|
|
<span>Shopping Cart</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<!-- Breadcrumb Section End -->
|
|
|
|
<!-- Shopping Cart Section Begin -->
|
|
<section class="shopping-cart spad">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-8">
|
|
<div class="shopping__cart__table">
|
|
|
|
@if (session()->has('success'))
|
|
<div class="alert alert-success">
|
|
{{ session()->get('success') }}
|
|
</div>
|
|
@endif
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Product</th>
|
|
<th>Quantity</th>
|
|
<th>Total</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
|
|
|
|
|
|
{{-- <tbody>
|
|
@foreach ($cartItems as $item)
|
|
<tr>
|
|
<td class="product__cart__item">
|
|
<div class="product__cart__item__pic">
|
|
<img src="{{ asset('uploads/products/' . $item->picture) }}" alt="">
|
|
</div>
|
|
</td>
|
|
<td class="quantity__item">
|
|
<div class="product__cart__item__text">
|
|
<h6>{{ $item->name }} (<b>Nrs {{ $item->price }}</b>)</h6>
|
|
<h5></h5>
|
|
</div>
|
|
<div class="quantity">
|
|
<input type="number" class="form-control" name="quantity" min="1"
|
|
max="{{ $item->pQuantity }}" value="{{ $item->quantity }}">
|
|
</div>
|
|
</td>
|
|
<td class="cart__price"><br> Nrs. {{ $item->price * $item->quantity }}</td>
|
|
|
|
<td class="cart__close"> <a href="{{ url::to('deleteCartItem/' . $item->id) }}">
|
|
<i class="fa fa-trash"></i></a>
|
|
</td>
|
|
|
|
</tr>
|
|
@endforeach
|
|
</tbody> --}}
|
|
<tbody>
|
|
@foreach ($cartItems as $item)
|
|
<tr>
|
|
<td class="product__cart__item">
|
|
<div class="product__cart__item__pic">
|
|
<img src="{{ asset('uploads/products/' . $item->picture) }}" alt="">
|
|
</div>
|
|
</td>
|
|
<td class="quantity__item">
|
|
<div class="product__cart__item__text">
|
|
<h6>{{ $item->name }}</h6>
|
|
<h5><b>Nrs {{ $item->price }}</b></h5>
|
|
</div>
|
|
<div class="quantity">
|
|
<form action="{{ route('cart.update', $item->id) }}" method="post">
|
|
@csrf
|
|
<input type="number" class="form-control" name="quantity"
|
|
min="1" max="{{ $item->pQuantity }}"
|
|
value="{{ $item->quantity }}">
|
|
<button type="submit" class="btn btn-primary">Update</button>
|
|
</form>
|
|
</div>
|
|
</td>
|
|
<td class="cart__price"><br> Nrs. {{ $item->price * $item->quantity }}</td>
|
|
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
|
|
|
|
|
|
</table>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-lg-6 col-md-6 col-sm-6">
|
|
<div class="continue__btn">
|
|
<a href="#">Continue Shopping</a>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-6 col-md-6 col-sm-6">
|
|
<div class="continue__btn update__btn">
|
|
<a href="#"><i class="fa fa-spinner"></i> Update cart</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-4">
|
|
<div class="cart__discount">
|
|
<h6>Discount codes</h6>
|
|
<form action="#">
|
|
<input type="text" placeholder="Coupon code">
|
|
<button type="submit">Apply</button>
|
|
</form>
|
|
</div>
|
|
<div class="cart__total">
|
|
<h6>Cart total</h6>
|
|
<ul>
|
|
<li>Subtotal <span>$ 169.50</span></li>
|
|
<li>Total <span>$ 169.50</span></li>
|
|
</ul>
|
|
<a href="#" class="primary-btn">Proceed to checkout</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<!-- Shopping Cart Section End -->
|
|
|
|
<!-- Footer Section Begin -->
|
|
<x-footer />
|
|
<!-- Footer Section End -->
|