{{-- views/themes/default/products.blade.php --}} @extends('themes.default.layout') @section('title', 'Products - ' . $website->name) @section('content')

Our Products

Discover our amazing collection of high-quality products

@if($selectedCategory)

Category: {{ $selectedCategory->name }}

{{ $selectedCategory->description }}

@endif @if($products->count() > 0) @foreach($products as $product)
@if($product->images && count($product->images) > 0) {{ $product->name }} @else @endif
{{ $product->name }}

{{ Str::limit($product->description, 120) }}

@if($product->categories->count() > 0)
@foreach($product->categories->take(2) as $category) {{ $category->name }} @endforeach
@endif
@if($product->sale_price) RM {{ number_format($product->sale_price, 2) }} RM {{ number_format($product->price, 2) }} Sale! @else RM {{ number_format($product->price, 2) }} @endif
@if($product->has_variations)
{{ $product->variations->count() }} variations available
@endif @if($product->in_stock)
In Stock ({{ $product->total_stock }} units)
@else
Out of Stock
@endif
View Details @if($product->in_stock) @endif
@endforeach @else

No Products Found

@if(request('search') || request('category')) Try adjusting your search or browse our categories. @else We're working on adding amazing products. Check back soon! @endif

View All Products
@endif
{{-- Pagination can be added here if needed --}}
@if($categories->count() > 0)

Shop by Category

@foreach($categories->take(6) as $category)
@if($category->image) {{ $category->name }} @endif
@if(!$category->image) @endif
{{ $category->name }}

{{ $category->description ?: 'Explore our ' . strtolower($category->name) . ' collection' }}

{{ $category->allProducts()->count() }} products
Browse {{ $category->name }}
@endforeach
@endif @endsection