@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