@extends('front.layout') @section('pagename') - {{__('Product')}} @endsection @section('styles') @endsection @section('content')

{{convertUtf8($bs->cart_title)}}

@if($cart != null)
    @php $cartTotal = 0; $countitem = 0; if($cart){ foreach($cart as $p){ $cartTotal += $p['total']; $countitem += $p['qty']; } } @endphp
  • {{__('Your Cart')}}: {{$cart ? $countitem : 0}} {{__('Items')}}
  • {{__('Total')}} : {{$be->base_currency_symbol_position == 'left' ? $be->base_currency_symbol : ''}} {{$cartTotal}} {{$be->base_currency_symbol_position == 'right' ? $be->base_currency_symbol : ''}}
@endif
@if($cart != null) @foreach ($cart as $key => $item) @php $id = $item["id"]; $product = App\Models\Product::findOrFail($id); @endphp @endforeach
{{__('Product')}} {{__('Product Title')}} {{__('Quantity')}} {{__('Price')}} {{__('Total')}} {{__('Remove')}}
{{convertUtf8($item['name'])}}
@if (!empty($item["variations"]))

{{__("Variation")}}:
@php $variations = $item["variations"]; @endphp @foreach ($variations as $vKey => $variation) {{str_replace("_"," ",$vKey)}}: {{$variation["name"]}} @if (!$loop->last) , @endif @endforeach

@endif @if (!empty($item["addons"]))

{{__("Add On's")}}:
@php $addons = $item["addons"]; @endphp @foreach ($addons as $addon) {{$addon["name"]}} @if (!$loop->last) , @endif @endforeach

@endif

{{__("Product")}}: {{$be->base_currency_symbol_position == 'left' ? $be->base_currency_symbol : ''}}{{$item['product_price'] * $item["qty"]}}{{$be->base_currency_symbol_position == 'right' ? $be->base_currency_symbol : ''}}

@if (!empty($item['variations']))

{{__("Variation")}}: @php $variations = $item['variations']; $price = 0; foreach ($variations as $vKey => $variation) { if (is_array($variation) && array_key_exists('price', $variation)) { $price += $variation['price']; } } @endphp {{$be->base_currency_symbol_position == 'left' ? $be->base_currency_symbol : ''}}{{$price * $item["qty"]}}{{$be->base_currency_symbol_position == 'right' ? $be->base_currency_symbol : ''}}

@endif @if (!empty($item['addons']))

{{__("Add On's")}}: @php $addons = $item['addons']; $addonTotal = 0; foreach ($addons as $addon) { $addonTotal += $addon["price"]; } @endphp {{$be->base_currency_symbol_position == 'left' ? $be->base_currency_symbol : ''}}{{$addonTotal * $item["qty"]}}{{$be->base_currency_symbol_position == 'right' ? $be->base_currency_symbol : ''}}

@endif
{{$be->base_currency_symbol_position == 'left' ? $be->base_currency_symbol : ''}}{{$item['total']}}{{$be->base_currency_symbol_position == 'right' ? $be->base_currency_symbol : ''}}
@else

{{__('Cart is empty!')}}

@endif
@if ($cart != null)
@endif
@endsection @section('scripts') @endsection