@php
$grandSubtotal = 0;
$qty = 0;
$option_price = 0;
@endphp
@if (Session::has('cart'))
@foreach (Session::get('cart') as $key => $cart)
@php
$grandSubtotal = ($cart['main_price'] + $grandSubtotal + $cart['attribute_price']) * $cart['qty'];
@endphp
{{ $cart['qty'] }} x
@php
$totalAttributePrice = 0;
foreach ($cart['attribute']['option_price'] as $option_price) {
$totalAttributePrice += $option_price;
}
$price = $cart['main_price'] + $totalAttributePrice;
@endphp
{{ PriceHelper::setCurrencyPrice($price) }}
@foreach ($cart['attribute']['option_name'] as $optionkey => $option_name)
{{ $cart['attribute']['names'][$optionkey] }}: {{ $option_name }}
@endforeach
@endforeach
{{ __('Subtotal') }}:
{{ PriceHelper::setCurrencyPrice($grandSubtotal) }}
@else
{{ __('Cart empty') }}
@endif