@if (!$showCart)
@if($restaurant)
@livewire('components.ad-slider', ['position' => 'menu_browse', 'restaurantId' => $restaurant->id])
@endif
@if($headerType === 'text')
{{ $headerText }}
@elseif($headerType === 'image' && count($headerImages) > 0)
@foreach($headerImages as $index => $image)
@endforeach
@if(count($headerImages) > 1)
@foreach($headerImages as $index => $image)
@endforeach
@endif
@else
@lang('messages.frontHeroHeading')
@endif
@if($order && $hasCurrentOrder)
Your Previous Order
{{ $order->show_formatted_order_number }} • {{ $order->items->count() }} items
@foreach($order->items as $item)
{{ $item->menuItem->item_name }}
×{{ $item->quantity }}
@if(isset($item->menuItemVariation) && $item->menuItemVariation->variation)
{{ $item->menuItemVariation->variation }}
@endif
@if($item->modifierOptions->isNotEmpty())
@foreach($item->modifierOptions as $modifier)
{{ $modifier->name }}
@endforeach
@endif
{{ currency_format($item->price + $item->modifierOptions->sum('price'), $restaurant->currency_id) }}
@endforeach
Order Total
{{ currency_format($order->total, $restaurant->currency_id) }}
@endif
@endif
@if (!$showCart)
@if($restaurant)
@livewire('components.ad-popup', ['position' => 'menu_browse', 'restaurantId' => $restaurant->id, 'delay' => 10000])
@endif
@endif
@if (!$showCart)
@if (count($menuList) > 8)
@endif
is_null($filterCategories),
'bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700' => !is_null($filterCategories),
'opacity-50 cursor-wait' => false,
])>
@lang('app.showAll')
$filterCategories === 'promotions',
'bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700' => $filterCategories !== 'promotions',
])>
@lang('menu.promotions')
@foreach ($categoryList as $item)
@php
$itemCount = $item->items_count ?? $item->items->count() ?? 0;
@endphp
@if ($itemCount > 0)
id }})"
@class([
'flex-shrink-0 px-4 py-2.5 text-sm font-medium rounded-lg transition-all duration-200 inline-flex items-center gap-2 whitespace-nowrap min-h-[44px] relative',
'bg-skin-base text-white shadow-sm' => $filterCategories == $item->id,
'bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700' => $filterCategories != $item->id,
])>
{{ $item->getTranslation('category_name', session('locale', app()->getLocale())) }}
{{ $itemCount }}
@endif
@endforeach
is_null($filterCategories),
'text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700' => !is_null(
$filterCategories),
])>
@lang('app.showAll')
$filterCategories === 'promotions',
'text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700' => $filterCategories !== 'promotions',
])>
@lang('menu.promotions')
@foreach ($categoryList as $item)
@php
$itemCount = $item->items_count ?? $item->items->count() ?? 0;
@endphp
@if ($itemCount > 0)
$filterCategories == $item->id,
'text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700' =>
$filterCategories != $item->id,
])>
{{ $item->getTranslation('category_name', session('locale', app()->getLocale())) }}
{{ $itemCount }}
@endif
@endforeach
@lang('app.filters')
@lang('app.sort')
$sortBy === 'default',
'text-gray-700 dark:text-gray-300' => $sortBy !== 'default'
])>
@lang('app.default')
$sortBy === 'name_asc',
'text-gray-700 dark:text-gray-300' => $sortBy !== 'name_asc'
])>
@lang('app.nameAsc')
$sortBy === 'name_desc',
'text-gray-700 dark:text-gray-300' => $sortBy !== 'name_desc'
])>
@lang('app.nameDesc')
$sortBy === 'price_low',
'text-gray-700 dark:text-gray-300' => $sortBy !== 'price_low'
])>
@lang('app.priceLowToHigh')
$sortBy === 'price_high',
'text-gray-700 dark:text-gray-300' => $sortBy !== 'price_high'
])>
@lang('app.priceHighToLow')
@lang('app.filters')
@lang('app.sortBy')
@lang('app.default')
@lang('app.nameAsc')
@lang('app.nameDesc')
@lang('app.priceLowToHigh')
@lang('app.priceHighToLow')
@if ($restaurant?->show_veg || $restaurant?->show_halal)
@endif
@endif
@if ($showMenu)
@if($restaurant)
@livewire('components.ad-popup', ['position' => 'menu_browse', 'restaurantId' => $restaurant->id, 'delay' => 10000])
@endif
@for ($i = 0; $i < 3; $i++)
@for ($j = 0; $j < 6; $j++)
@endfor
@endfor
@forelse ($menuItems as $key => $itemCat)
@php
// Get category ID from first item in the category
$categoryId = $itemCat->first()?->item_category_id ?? null;
// Create a safe ID attribute - use category ID if available, otherwise create slug from category name
if ($categoryId) {
$categoryIdAttr = $categoryId;
} else {
// Create slug from category name for uncategorized items
$categoryIdAttr = 'category-' . \Illuminate\Support\Str::slug($key);
}
@endphp
@empty
@lang('messages.noItemAdded')
@endforelse
@if($hasMoreItems && !$showCart)
Load More Items
Loading...
@endif
@if($restaurant)
@livewire('components.ad-banner', ['position' => 'menu_browse', 'restaurantId' => $restaurant->id])
@endif
@if (is_null(customer()) && $restaurant->customer_login_required)
@lang('app.login')
@endif
@if ($cartQty > 0)
@lang('modules.order.totalItem'):
+ @lang('modules.order.taxes')
@lang('modules.order.viewCart')
@endif
@endif
@if ($showCart)
@if($restaurant)
@livewire('components.ad-slider', ['position' => 'cart', 'restaurantId' => $restaurant->id])
@endif
@if ($restaurant->allow_customer_orders)
@lang('modules.order.orderType')
@endif
@lang('modules.order.yourOrder')
@foreach ($orderItemList as $key => $item)
@php
$currentQty = $orderItemQty[$key] ?? 0;
@endphp
@if ($restaurant && !$restaurant->hide_menu_item_image_on_customer_site)
@endif
{{ $item->item_name }}
@if (isset($orderItemVariation[$key]))
{{ $orderItemVariation[$key]->variation }}
@endif
{{-- @if ($item->preparation_time)
@lang('modules.menu.preparationTime'): {{ $item->preparation_time }} @lang('modules.menu.minutes')
@endif --}}
@php
// Use display price (base price without tax for inclusive items)
$displayPrice = $this->getItemDisplayPrice($key);
// Total amount per line (what customer pays)
$totalAmount = $orderItemAmount[$key];
@endphp
@if ($taxMode === 'item' && $restaurant?->tax_inclusive)
{{ currency_format($displayPrice, $restaurant->currency_id) }} ×
{{ $orderItemQty[$key] }}
@endif
{{ currency_format($totalAmount, $restaurant->currency_id) }}
@if (!empty($itemModifiersSelected[$key]))
@foreach ($itemModifiersSelected[$key] as $modifierOptionId)
{{ $this->modifierOptions[$modifierOptionId]->name }}
{{ currency_format($this->modifierOptions[$modifierOptionId]->price, $this->modifierOptions[$modifierOptionId]->modifierGroup->branch->restaurant->currency_id) }}
@endforeach
@endif
@if (isset($this->itemNotes[$key]) && !empty($this->itemNotes[$key]))
{{ $this->itemNotes[$key] }}
@else
$refs.noteInput.focus())"
class="inline-flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium rounded-full text-gray-700 hover:bg-skin-base/10 hover:text-skin-base dark:text-gray-300 dark:hover:text-gray-200 dark:hover:bg-gray-600 transition-all duration-200 group">
@lang('modules.order.addNote')
@endif
@endforeach
@if ($cartQty > 0)
@lang('modules.order.addNote')
@lang('modules.order.addNote')
@lang('modules.order.orderSummary')
@lang('modules.order.totalItem')
{{ array_sum(array_filter($orderItemQty ?? [])) }}
@lang('modules.order.subTotal')
{{ currency_format($subTotal, $restaurant->currency_id) }}
@if (count($orderItemList) > 0 && $extraCharges)
@foreach ($extraCharges as $charge)
{{ $charge->charge_name }}
@if ($charge->charge_type == 'percent')
({{ $charge->charge_value }}%)
@endif
{{ currency_format($charge->getAmount($subTotal), $restaurant->currency_id) }}
@endforeach
@endif
@if ($taxMode == 'order')
@foreach ($taxes as $item)
{{ $item->tax_name }} ({{ $item->tax_percent }}%)
{{ currency_format(($item->tax_percent / 100) * $subTotal, $restaurant->currency_id) }}
@endforeach
@else
@if (!empty($orderItemTaxDetails) && count($orderItemTaxDetails))
@php
$taxTotals = [];
$totalTax = 0;
foreach ($orderItemTaxDetails as $item) {
$qty = $item['qty'] ?? 1;
foreach ($item['tax_breakup'] as $taxName => $taxInfo) {
if (!isset($taxTotals[$taxName])) {
$taxTotals[$taxName] = [
'percent' => $taxInfo['percent'],
'amount' => $taxInfo['amount'] * $qty,
];
} else {
$taxTotals[$taxName]['amount'] += $taxInfo['amount'] * $qty;
}
}
$totalTax += collect($item['tax_amount'])->sum();
}
@endphp
@foreach ($taxTotals as $taxName => $taxInfo)
{{ $taxName }} ({{ $taxInfo['percent'] }}%)
{{ currency_format($taxInfo['amount'], $restaurant->currency_id) }}
@endforeach
@lang('modules.order.totalTax')
@lang($restaurant?->tax_inclusive ? 'modules.settings.taxInclusive' : 'modules.settings.taxExclusive')
{{ currency_format($totalTax, $restaurant->currency_id) }}
@endif
@endif
@if ($orderType === 'delivery' && !is_null($deliveryFee))
@lang('modules.delivery.deliveryFee')
@if ($deliveryFee > 0)
{{ currency_format($deliveryFee, $restaurant->currency_id) }}
@else
@lang('modules.delivery.freeDelivery')
@endif
@endif
@lang('modules.order.total')
@if ($orderType === 'delivery' && !empty($deliveryAddress))
@lang('modules.delivery.deliveryAddress')
@if (!empty($deliveryAddress))
@lang('modules.delivery.changeDeliveryAddress')
@endif
@if (!empty($deliveryAddress))
@endif
@endif
@if (is_null($customer) && (
($orderType == 'delivery' && $restaurant->require_login_for_delivery_orders) ||
($orderType == 'pickup' && $restaurant->require_login_for_pickup_orders) ||
($orderType == 'dine_in' && $restaurant->customer_login_required)
))
@lang('app.next') (Login Required)
@elseif (is_null($customer) && $orderType == 'pickup' && !$restaurant->require_login_for_pickup_orders)
@lang('app.next')
@elseif ($orderType == 'pickup')
@lang('app.next')
@elseif ($orderType == 'delivery')
@if (empty($deliveryAddress))
@lang('app.next')
@else
@php
$isPaymentEnabled =
in_array($orderType, ['dine_in', 'delivery', 'pickup']) &&
(($orderType == 'dine_in' && $paymentGateway->is_dine_in_payment_enabled) ||
($orderType == 'delivery' &&
$paymentGateway->is_delivery_payment_enabled) ||
($orderType == 'pickup' && $paymentGateway->is_pickup_payment_enabled));
$showPayNow =
$paymentGateway->is_qr_payment_enabled ||
$paymentGateway->stripe_status ||
$paymentGateway->razorpay_status ||
$paymentGateway->flutterwave_status ||
$paymentGateway->paypal_status ||
$paymentGateway->payfast_status ||
$paymentGateway->xendit_status ||
$paymentGateway->is_offline_payment_enabled;
$loadingSpinner = '
';
@endphp
@if (!$order)
@if ($showPayNow)
{!! $loadingSpinner !!}
@lang('modules.order.payNow')
@if (!$isPaymentEnabled)
{!! $loadingSpinner !!}
@lang('modules.order.payLater')
@endif
@else
{!! $loadingSpinner !!}
@lang('modules.order.placeOrder')
@endif
@else
{{-- When adding items to existing order, always show Place Order --}}
{{-- Request Bill should only appear on order success/detail page --}}
@if ($order->status === 'billed' && !$isPaymentEnabled)
{{-- Order is billed, show payment options --}}
{!! $loadingSpinner !!}
@lang('modules.order.payNow')
@else
{!! $loadingSpinner !!}
@lang('modules.order.placeOrder')
@endif
@endif
@endif
@else
@php
$isPaymentEnabled =
in_array($orderType, ['dine_in', 'delivery', 'pickup']) &&
(($orderType == 'dine_in' && $paymentGateway->is_dine_in_payment_enabled) ||
($orderType == 'delivery' &&
$paymentGateway->is_delivery_payment_enabled) ||
($orderType == 'pickup' && $paymentGateway->is_pickup_payment_enabled));
$showPayNow =
$paymentGateway->is_qr_payment_enabled ||
$paymentGateway->stripe_status ||
$paymentGateway->razorpay_status ||
$paymentGateway->flutterwave_status ||
$paymentGateway->paypal_status ||
$paymentGateway->payfast_status ||
$paymentGateway->xendit_status ||
$paymentGateway->is_offline_payment_enabled;
$loadingSpinner = '
';
@endphp
@if (!$order)
@if ($showPayNow)
{!! $loadingSpinner !!}
@lang('modules.order.payNow')
@if (!$isPaymentEnabled)
{!! $loadingSpinner !!}
@lang('modules.order.payLater')
@endif
@else
{!! $loadingSpinner !!}
@lang('modules.order.placeOrder')
@endif
@else
{{-- When adding items to existing order, always show Place Order --}}
{{-- Request Bill should only appear on order success/detail page --}}
@if ($order->status === 'billed' && !$isPaymentEnabled)
{{-- Order is billed, show payment options --}}
{!! $loadingSpinner !!}
@lang('modules.order.payNow')
@else
{!! $loadingSpinner !!}
@lang('modules.order.placeOrder')
@endif
@endif
@endif
@else
@endif
@if($restaurant)
@livewire('components.ad-banner', ['position' => 'cart', 'restaurantId' => $restaurant->id])
@endif
@endif