@extends('web.layouts.layout')
@section('content')

    <main>



        <!-- ---------- cart page ----------- -->
        <section class="cart-pg py-4">
            <div class="container">
                <form method="GET" action="{{route('web.checkout')}}" id="calculate_form">
                    <div class="row gx-0">
                        <div class="col-lg-9" id="products">
                        </div>
                        <div class="col-lg-3" >

                            <div class="sticky-card mb-4">
                                <div class="price-box">
                                    <h6 class="cr-blue text-center"> {{__('web.summary_order')}} </h6>
                                    <div class="form-group code-group py-0">
                                        <span class="icon"> <i class="fal fa-ticket"></i> </span>
                                        <input type="text" name="coupon" value="{{$request->coupon}}" onchange="checkCoupon()" class="form-control" placeholder="{{__('web.enter_code')}}">
                                        <button type="button" class=""> {{__('web.apply')}} </button>

                                    </div>
                                    <p id="discount_msg">

                                    </p>
                                    <div id="calculate">

                                    </div>
                                    <button type="submit" class="butn w-100">
                                        <span> {{__('web.continue_pay')}} </span>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </section>





    </main>


@endsection
@section('inject_js')
    <script>
        let url_calculate = "{{route('web.cart.calculate')}}"
        let url_coupon = "{{route('web.check.coupon')}}"
    </script>
    <script src="{{url('')}}/assets/web/js/custom/cart.js"></script>
@endsection
