VaKeR CYBER ARMY
Logo of a company Server : Apache
System : Linux host44.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
User : vapecompany ( 2719)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /home/vapecompany/demo.vapecompany.com.bd/resources/views/frontend/pages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/vapecompany/demo.vapecompany.com.bd/resources/views/frontend/pages/cart.blade.php
@extends('frontend.layouts.app')
@section('css')

<link rel="stylesheet" type="text/css" href="{{url('public/frontend/styles/cart_styles.css')}}">
<link rel="stylesheet" type="text/css" href="{{url('public/frontend/styles/cart_responsive.css')}}">
@endsection

@section('content')



	<!-- Cart -->
    <div class="container cart-container">
        <div class="card cart_card">
            <div class="row row-mar">
           

                <div class="col-md-8 cart_page">
                    <div class="title cart_title">
                        <div class="row row-mar">
                            <div class="col">
                                <h4><b>Shopping Cart</b></h4>
                            </div>
                            <div class="col align-self-center text-right text-muted">{{$cartQty}} items</div>
                        </div>
                    </div>
                   

                @foreach($cart as $details)
                    <div class="row row-mar border-top border-bottom">
                        <div class="row row-mar main align-items-center">
                            <div class="col-2"><img style="height:50px;width:100%;" class="img-fluid" src="{{url('public/images/product/'.$details->options->image)}}"></div>
                            <div class="col">
                                <div class="row row-mar text-muted">{{$details->name}}</div>
                                <!-- <div class="row row-mar">Cotton T-shirt</div> -->
                            </div>
                            <div class="col"> <a href="" id="cartDecrement" data-id="{{ $details->rowId }}" class="count">-</a><a href="#" class="count">{{$details->qty}}</a><a id="cartIncrement" data-id="{{ $details->rowId }}" href="#" class="count">+</a> </div>
                            <div class="col">&euro; {{$details->subtotal}} 
                            <span class="close" style="font-size: 20px">
                                <a  href="" id="cartRemove" data-id="{{ $details->rowId }}">&#10005;</a>    
                            </span></div>
                        </div>
                        <hr>
                    </div>
                    
                @endforeach
                {{-- @foreach(session('cart') as $id => $details)
                    <div class="row row-mar border-top border-bottom">
                        <div class="row row-mar main align-items-center">
                            <div class="col-2"><img style="height:50px;width:100%;" class="img-fluid" src="{{url('public/images/product/'.$details['image'])}}"></div>
                            <div class="col">
                                <div class="row row-mar text-muted">{{$details['name']}}</div>
                                <!-- <div class="row row-mar">Cotton T-shirt</div> -->
                            </div>
                            @php $total++;$tp +=$details['price'] * $details['quantity'] ; @endphp
                            <div class="col"> <a href="#" class="count">-</a><a href="#" class="count">{{$details['quantity']}}</a><a href="#" class="count">+</a> </div>
                            <div class="col">&euro; {{$details['price'] * $details['quantity']}} <span class="close">&#10005;</span></div>
                        </div>
                    </div>
                @endforeach --}}


                <div class="back-to-shop"><a href="{{url('shop')}}">&leftarrow; <span class="text-muted">Back to shop</span></a></div>
                </div>
                <div class="col-md-4 summary">
                    <div>
                        <h5 class="h5summary"><b>Summary</b></h5>
                    </div>
                    <hr>
                    <div class="row row-mar">
                        <div class="col" style="padding-left:0;">ITEMS {{$cartQty}}</div>
                        <div class="col text-right">&euro; {{$cartTotal}}</div>
                    </div>
                    <form class="cart-form">
                        <p>SHIPPING</p> <select class="cart-select">
                            <option class="text-muted">Standard-Delivery- &euro;5.00</option>
                        </select>
                        <p>GIVE CODE</p> <input id="code" class="cart-input" placeholder="Enter your code">
                    </form>
                    <div class="row row-mar" style="border-top: 1px solid rgba(0,0,0,.1); padding: 2vh 0;">
                        <div class="col">TOTAL PRICE</div>
                        <div class="col text-right">&euro; {{$cartTotal}}</div>
                    </div> <a href="{{ url('checkout') }}" class="chekoutbtn" style="display: block; text-align: center">CHECKOUT</a>
                </div>

                
                   
                   
                   
                    
            </div>
        </div>
    </div>
	
	


    @endsection

@section('js')
<script src="{{url('public/frontend/plugins/slick-1.8.0/slick.js')}}"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;key=AIzaSyCIwF204lFZg1y4kPSIhKaHEXMLYxxuMhA"></script>
<script src="{{url('public/frontend/js/custom.js')}}"></script>

<script>
        $(document).on("click","a#cartRemove",function(e) {
            e.preventDefault();
                var id = $(this).data('id');
                $.ajax({
                    type: "POST",
                    url: "{{ route('remove.cart') }}",
                    data: {
                        id  : id,
                    },
                    dataType: "json",
                    success: function (response) {
                        window.location.reload();
                        Swal.fire({
                            toast: true,
                            position: 'top-end',
                            icon: 'success',
                            title: 'Product removed successfull',
                            showConfirmButton: false,
                            timer: 3000
                        })
                    },
                    error: function (error) {
                        Swal.fire({
                            toast: true,
                            position: 'top-end',
                            icon: 'error',
                            title: 'Product removed failed',
                            showConfirmButton: false,
                            timer: 3000
                        })
                    }
                });
        });
        // cart increment
		$('#cartIncrement').click(function (e) {
            e.preventDefault();
            var id = $(this).data('id');
            $.ajax({
                type: "POST",
                url: "{{ route('cart.increment') }}",
                data: {
                    id  : id,
                },
                dataType: "json",
                success: function (response) {
                    window.location.reload();
                }
            });
        });
        // cart increment
		$('#cartDecrement').click(function (e) {
            e.preventDefault();
            var id = $(this).data('id');
            $.ajax({
                type: "POST",
                url: "{{ route('cart.decrement') }}",
                data: {
                    id  : id,
                },
                dataType: "json",
                success: function (response) {
                    window.location.reload();
                }
            });
        });
</script>
@endsection        

VaKeR 2022