{!! __('v2/front_site.cart_title') !!}

@if ((authCustomer() || (isset($cart['is_guest']) && $cart['is_guest'] == 1)) && isset($cartItems['items']) && count($cartItems['items']) > 0) @php $companyDiscount = getCompanyDiscount(); $companyDiscountAmount = $discountedPrices = 0; $allfreeFood= 0; $eligible = getFoodEligible(); if($eligible) { $allfreeFood = getAllFood(); } $freefood = []; $prices = $tax = 0; $differentStore = false; $text = ''; if ($cartItems['store_id'] != $storeId) { $text = __('v2/front_site.different_store_cart', ['store' => $cartItems['store_name'], 'route' => route('front.v2.store-selection', $cart['store_id'])]); $differentStore = true; } $isGiftCard = session('is_gift_card') || session('use_gift_balance'); $onlyAppliedGiftCard = !(session('is_gift_card')) && session('use_gift_balance'); $remainingGiftCardBalance = '0.00'; $giftCardBalance = getGiftCardBalance(session('customer_id')); $giftBalanceApplied = session('use_gift_balance'); @endphp @if ($differentStore)
{!! $text !!}
@endif @php $applicableOffers = []; $canBeAppliedOffers = getAllFoodOffers(); foreach ($canBeAppliedOffers as $key => $o){ if($o->quantity >= $o->buy_quantity){ $applicableOffers[$o->category_id.$o->variation_id] = '

Apply

'; } } @endphp @if ($allfreeFood) @php $applicableOffers = []; @endphp @foreach ($allfreeFood as $keys => $onefreeFood) @foreach ($cart['items'] as $key => $c) @if ($c['category_id'] == $keys && $c['reward_applied'] != 1 && $onefreeFood['variation_id'] == $c['variation_master_id']) @php $freefood[$c['category_id']] = $c['item_id'].$c['variation_id']; break; @endphp @endif @endforeach @endforeach @endif {!! Form::open(['route' => 'front.v2.place-order', 'method' => 'POST', 'id' => 'place_order','class' => '__view_cart_table']) !!}
@php $taxAmounts = []; $totalItemTax = 0; @endphp @foreach ($cartItems['items'] as $items) @php $itemCheck=$items['item_id'].$items['variation_id']; $totalItemTax += $items['total_tax_amount']; $taxAmounts[$items['tax_perc']][] = $items['total_tax_amount']; $itemTaxPerc = $items['tax_perc']; @endphp @if ($items['is_available'] == 0)
{!! __('v2/front_site.not_avail') !!}
@endif
  • @if ($items['is_half'] == 1) @else @endif {!! array_key_exists($items['category_id'].$items['variation_master_id'],$applicableOffers) ? $applicableOffers[$items['category_id'].$items['variation_master_id']] : '' !!}
    @php $variation = $items['variation_name'] ? ' - ' . $items['variation_name'] : ''; @endphp @if ($items['is_half'] == 1) @php $halfPizzaData = json_decode($items['item_json']); @endphp @if (!empty($halfPizzaData))
    {{ $halfPizzaData[0]->item_name . ' + ' . $halfPizzaData[1]->item_name }}
    @endif @else
    {{ $items['name'] . $variation }}
    @endif
    @if (isset($items['variation_type_id']) && $items['variation_type_id'] > 0) {!! $items['variation_type_name'] ?? "" !!} @endif
  • @if($items['is_available'] == 0) @else @if ($items['reward_applied'] == 1) @else @if($items['quantity']==1) @else @endif @endif @endif
    @if ($allfreeFood) {{--@php dump($itemCheck,$freefood)@endphp--}} @if (in_array($itemCheck, $freefood) && $items['is_free'] == 1) @foreach ($allfreeFood as $key => $onefreeFood) @if($key == $items['category_id'])