laravelEcomm/resources/views/cart.blade.php

143 lines
6.1 KiB
PHP
Raw Normal View History

2024-07-04 04:34:45 +00:00
<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">
2024-07-05 06:55:14 +00:00
<a href="{{ url::to('/') }}">Home</a>
<a href="{{ url::to('shop') }}">Shop</a>
2024-07-04 04:34:45 +00:00
<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">
2024-07-05 07:29:27 +00:00
@if (session()->has('success'))
<div class="alert alert-success">
{{ session()->get('success') }}
</div>
@endif
2024-07-04 04:34:45 +00:00
<table>
<thead>
<tr>
<th>Product</th>
<th>Quantity</th>
<th>Total</th>
<th></th>
</tr>
</thead>
2024-07-05 06:55:14 +00:00
{{-- <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="">
2024-07-04 04:34:45 +00:00
</div>
2024-07-05 06:55:14 +00:00
</td>
<td class="quantity__item">
<div class="product__cart__item__text">
<h6>
{{ $item->name }}
</h6>
<h5>
<b>Nrs {{ $item->price }}</b>
</h5>
2024-07-04 04:34:45 +00:00
</div>
2024-07-05 06:55:14 +00:00
<div class="quantity">
<input type="number" class="form-control" name="quantity" min="1"
max="{{ $item->pQuantity }}" value="{{ $item->quantity }} ">
2024-07-04 04:34:45 +00:00
</div>
2024-07-05 06:55:14 +00:00
</td>
<td class="cart__price"> <br> Nrs. {{ $item->price * $item->quantity }} </td>
<td class="cart__close"><i class="fa fa-close"></i></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="">
2024-07-04 04:34:45 +00:00
</div>
2024-07-05 06:55:14 +00:00
</td>
<td class="quantity__item">
<div class="product__cart__item__text">
2024-07-05 07:29:27 +00:00
<h6>{{ $item->name }} (<b>Nrs {{ $item->price }}</b>)</h6>
<h5></h5>
2024-07-05 06:55:14 +00:00
</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>
2024-07-05 07:29:27 +00:00
<td class="cart__close"> <a href="{{ url::to('deleteCartItem/' . $item->id) }}">
<i class="fa fa-trash"></i></a>
</td>
2024-07-05 06:55:14 +00:00
</tr>
@endforeach
2024-07-04 04:34:45 +00:00
</tbody>
2024-07-05 06:55:14 +00:00
2024-07-04 04:34:45 +00:00
</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 -->