@php
$value = Session::get('cart');
@endphp
@if(!empty($value))
@foreach ($value as $row)
@php
$new_conversion_rate = new CurrencyController;
$new_conversion_rate = $new_conversion_rate->newfetchRates(session()->get('currency')['id'],$row->id)->getData()->exchange_rate;
@endphp
@if ($row->thumbnail != '')
@if ($row->thumbnail != '' && file_exists(public_path() . '/images/simple_products/' . $row->thumbnail))
@else
@endif
@else
@endif
|
{{ $row->product_name }} |
@if ($row->offer_price == 0)
{{ price_format($row->price * $new_conversion_rate) }}
@else
{{ price_format($row->offer_price * $new_conversion_rate) }}
{{ price_format($row->price * $new_conversion_rate) }}
@endif |
@endforeach
@endif
{{ __('staticwords.Subtotal') }}
@php
$total = 0;
@endphp
@guest
@if (!empty(Session::get('cart')))
@php
$oot = [];
@endphp
@foreach ($cts = Session::get('cart') as $key => $c)
@if(!empty($cts))
@php
$new_conversion_rate = new CurrencyController;
$new_conversion_rate = $new_conversion_rate->newfetchRates(session()->get('currency')['id'],$c['id'])->getData()->exchange_rate;
@endphp
@if ($c['offer_price'] == '' || $c['offer_price'] == 0 || $c['offer_price'] == null)
@php
$price = $cts[$key]['price'] * $new_conversion_rate;
@endphp
@else
@php
$price = $cts[$key]['offer_price'] * $new_conversion_rate;
@endphp
@endif
@php
$total = $total + $price;
@endphp
@endif
@endforeach
{{ sprintf('%.2f', $total , 2) }}
@endif
@else
@php
$cart_table = App\Cart::where('user_id', auth()->user()->id)->get();
$oot = [];
@endphp
@if (!empty($cart_table))
@foreach ($cart_table as $c)
@php
$stock = App\AddSubVariant::withTrashed()->find($c->variant_id);
@endphp
@if (isset($stock) && $stock->stock == 0)
@php
array_push($oot, 0);
@endphp
@endif
@if ($c->semi_total == '' || $c->semi_total == null)
@php $price = $c->price_total; @endphp
@else
@php $price = $c->semi_total; @endphp
@endif
@php $total= $total+$price; @endphp
@endforeach
@endif
{{ sprintf('%.2f', $total * $new_conversion_rate, 2) }}
@endif
{{ __('staticwords.inclusive') }}
{{ __('staticwords.Total') }}
@php
$total = sprintf('%.2f',$total);
if (App\Cart::isCoupanApplied() == '1') {
$gtotal = $total - sprintf(App\Cart::getDiscount());
} else {
$gtotal=$total;
}
@endphp
{{ price_format($gtotal) }}