@php // session()->remove('current_address'); $amount = 0; if (auth()->check() && session()->has('current_address')) { $destination = session()->get('current_address'); $amount = @$destination->amount ; } $discount = 0; if (session()->has('coupon')) { $coupon = session()->get('coupon'); $discount = @$coupon['discount']; } $subtotal = Cart::instance('default')->subtotal(false,false,false) ; @endphp
{!! __('Shopping cart total') !!} @if ($discount > 0 && $subtotal > @$coupon['min_amount']) {{ @$subtotal - @$coupon['discount']}} @else {{ @$subtotal }} @endif {{ __('EGP') }}
{{--

{!! __('Cart summary') !!}

--}}
@if ($amount > 0 || !$showButtons || $discount > 0) @endif @if ($amount > 0 || !$showButtons) @endif @if ($discount > 0 && $subtotal > @$coupon['min_amount']) @php $min_amount = @$subtotal > @$coupon['min_amount'] ? $discount : '0.0'; @endphp @endif @if ($amount > 0 || !$showButtons || $discount > 0) @endif
{!! __('Subtotal') !!} {{ @$subtotal }} {{ __('EGP') }}
{{ __('Shipping') }} {{ $amount }} {{ __('EGP') }}
{!! __('Discount value') !!} {{ $min_amount }} {{ __('EGP') }}
{{ __('Totle Price') }} @if (@$subtotal > @$coupon['min_amount']) {{ @$subtotal + $amount - $discount}} @else {{ @$subtotal + $amount }} @endif {{ __('EGP') }}
@if (session()->has('coupon'))

{!! __('Discount coupon') !!}

{!! __('Discount Coupon is applied to purchases over') !!} ({{ @$coupon['min_amount'] }}) {!! __('EGP') !!}

@if (@$coupon['code'])

{!! __('Coupon discount') !!} : {{ @$coupon['code'] }}

@endif
@elseif(session()->get('curr_url') != 'cart')
@endif @if (session()->get('curr_url') == 'cart') @else @endif