@extends('user.app') @section('pagetitle') Cart @stop @section('main-content')
@php $totalprice = 0; @endphp
@include('user/layouts/messages')
@if(isset($carts) && count($carts)>0)
My Cart
@foreach($carts as $cart) @php $totalprice = ceil(number_format((float)round($totalprice + $cart->price), 2, '.', '')) ; $coursesimage = coursesimage($cart->product_id); $coursesurl = coursesurl($cart->product_id); @endphp
{{coursesfacalty($cart->product_id) }}

{{$cart->name}}

By {{ coursesfacalty($cart->product_id) }}

Rs.{{coursesprice($cart->product_id) }}Rs.{{ ceil(number_format((float)round($cart->price), 2, '.', '')) }}

{{ method_field('DELETE') }} {{ csrf_field() }}
@endforeach
Price Details

Price( {{ $count }} items)Rs.{{ $totalprice }}

@php $shipping_charge = 0; $subtotalprice = $totalprice; $wallet_value_for_total_product=0; $wallet_per_order = 0; $product_count=0; $wallet_value_for_total_product=0; @endphp @php if(isset($carts)){ $product_count = count($carts); } @endphp @php $wallet_per_order = 0; $total_wallet_order=$wallet->wallet_per_order*$product_count; if(isset($usermeta->current_wallet_balance) && $usermeta->current_wallet_balance>= $total_wallet_order ) { if($subtotalprice > $total_wallet_order ) { $wallet_value_for_total_product=$total_wallet_order; @endphp @if(isset($ucartdata)) @php $shipping_charge = $ucartdata->shipping_charge; @endphp @endif

Paid from Wallet Rs.{{ceil(number_format((float)$total_wallet_order, 2, '.', ''))}}

@php } } elseif(isset($usermeta->current_wallet_balance)) { if($subtotalprice>$usermeta->current_wallet_balance ) { $wallet_value_for_total_product =$usermeta->current_wallet_balance; @endphp

Paid from Wallet Rs.{{ceil(number_format((float)$wallet_value_for_total_product, 2, '.', ''))}}

@php } } @endphp @php $jtotalprice = ($subtotalprice - $wallet_value_for_total_product+$shipping_charge); @endphp @if(isset($ucartdata))

Shipping and Handling @php $shipping_charge = $ucartdata->shipping_charge; @endphp Rs.00

@endif

Amount PayableRs.{{ $jtotalprice }}

@else

Your Cart is Empty

@endif
@endsection