@php use Modules\Core\Helpers\Helper; @endphp @extends('front::layouts.master') @section('title','Cart Page') @section('content')
@if(Helper::getAllProductFromCart()) @csrf @foreach(Helper::getAllProductFromCart() as $key=>$cart) @endforeach @else @endif
@lang('partials.product') @lang('partials.name') UNIT PRICE... QUANTITY TOTAL
{{$cart->product['title']}}

{{$cart->product['title']}}

${{number_format($cart['price'],2)}}
${{$cart['amount']}}
There are no any carts available. Continue shopping
@if(Helper::getAllProductFromCart())
@csrf @foreach(Helper::getAllProductFromCart() as $key=>$cart)
{{$cart->product['title']}}
{{$cart->product['title']}}
Unit Price: ${{number_format($cart['price'],2)}}
Total: ${{$cart['amount']}}
Remove
@endforeach
@else

There are no any carts available.

Continue shopping
@endif
@if(session()->has('coupon')) @php $coupon = session('coupon'); $discountValue = is_array($coupon) ? ($coupon['value'] ?? 0) : (property_exists($coupon, 'value') ? $coupon->value : 0); $couponCode = is_array($coupon) ? ($coupon['code'] ?? '') : (property_exists($coupon, 'code') ? $coupon->code : ''); @endphp
Coupon Applied Successfully!
Code: {{ $couponCode }}
Discount: @if(Helper::totalCartPrice() > 0) ${{ number_format($discountValue, 2) }} @else $0.00 (Add items to cart to see discount) @endif
@endif
@if(session()->has('coupon')) Update Coupon @else Apply Coupon @endif
@if(session()->has('coupon')) @endif
Cart Summary
  • Cart Subtotal ${{number_format(Helper::totalCartPrice(),2)}}
  • @if(session()->has('coupon') && Helper::totalCartPrice() > 0) @php $coupon = session('coupon'); $discountValue = is_array($coupon) ? ($coupon['value'] ?? 0) : (property_exists($coupon, 'value') ? $coupon->value : 0); @endphp
  • You Save -${{ number_format($discountValue, 2) }}
  • @endif @php $total_amount = Helper::totalCartPrice(); if(session()->has('coupon') && Helper::totalCartPrice() > 0){ $coupon = session('coupon'); $discountValue = is_array($coupon) ? ($coupon['value'] ?? 0) : (property_exists($coupon, 'value') ? $coupon->value : 0); $total_amount = $total_amount - $discountValue; } @endphp
  • You Pay @if(Helper::totalCartPrice() > 0) ${{number_format($total_amount,2)}} @else $0.00 @endif
@endsection @push('styles') @endpush @push('scripts') @endpush