@extends('layouts.ecommerce_store') @section('title', ($settings['store_name'] ?? $business->name).' Online Store') @section('header_categories') @if($categories->isNotEmpty()) @endif @endsection @section('content') @if(!empty($settings['slider_images']))
@foreach($settings['slider_images'] as $index => $slide)
{{ $slide['alt'] ?? ($settings['store_name'].' promotion '.($index + 1)) }}
@endforeach
@if(count($settings['slider_images']) > 1)
@foreach($settings['slider_images'] as $index => $slide) @endforeach
@endif
@else
OFFICIAL ONLINE STORE

{{ $settings['store_name'] ?? $business->name }}

{{ $settings['tagline'] }}

Shop now @if(!empty($settings['messenger_url'])) Ask on Messenger @endif
Branch stockLive availability
Pickup or deliveryFlexible fulfillment
Secure checkoutVerified totals
@endif

{{ request('q') ? 'Search results for “'.request('q').'”' : 'Recommended for you' }}

{{ number_format($products->total()) }} {{ \Illuminate\Support\Str::plural('product', $products->total()) }}
Sort by @foreach([ 'featured' => 'Relevance', 'newest' => 'Latest', 'top_sales' => 'Top sales', 'name' => 'Name', 'price_asc' => 'Price: Low to high', 'price_desc' => 'Price: High to low', ] as $sortValue => $sortLabel) {{ $sortLabel }} @endforeach
@forelse($products as $product) @php $stock = (float) $product->variations->sum(fn($variation) => $availability[$variation->id] ?? 0); $prices = $product->variations->pluck('sell_price_inc_tax')->filter(); $slug = $product->ecommerce_slug ?: $product->id; $sold = (float) ($soldCounts[$product->id] ?? 0); $productUrl = route('ecommerce.store.product', ['store' => $business->ecommerce_store_slug, 'product' => $slug]); @endphp
{{ $product->name }} @if($product->ecommerce_featured)Featured@endif @if($stock <= 0)Sold out@endif
@if(optional($product->brand)->name || optional($product->category)->name)
{{ optional($product->brand)->name ?: optional($product->category)->name }}
@endif

{{ $product->name }}

@if($prices->isNotEmpty()) ₱{{ number_format((float) $prices->min(), 2) }} @if($prices->min() != $prices->max())– ₱{{ number_format((float) $prices->max(), 2) }}@endif @endif
{{ $stock > 0 ? number_format($stock).' available' : 'Out of stock' }} @if($sold > 0){{ number_format($sold) }} sold@endif
@if(!empty($settings['enable_pickup'])) Pickup @endif @if(!empty($settings['enable_pickup']) && !empty($settings['enable_delivery'])) · @endif @if(!empty($settings['enable_delivery'])) Delivery @endif
@empty
⌕

No matching products

Try a different search, category, brand, or price range.

View all products
@endforelse
@if($products->hasPages())
{{ $products->links() }}
@endif
@endsection @section('scripts') @endsection