@extends('ecommerce::layout.store-layout') @php $title = static fn($value) => is_array($value) ? ($value[app()->getLocale()] ?? $value['en'] ?? reset($value)) : ($value ?: ''); $image = static fn($value) => $value ?: asset('assets/images/pro/1.jpg'); $currencySymbol = \App\Domain\AppBase\Models\Setting\Currency::symbol(); $priceRanges = ['hundred' => '10 - 100 ' . $currencySymbol, 'twohundred' => '100 - 200 ' . $currencySymbol, 'threehundred' => '200 - 300 ' . $currencySymbol, 'fourhundredabove' => '400+ ' . $currencySymbol]; @endphp @section('title', $currentCategory->title ?? __('ecommerce::ecommerce.categories.categories')) @section('active-nav', 'categories') @section('page-styles') @endsection @section('content')

{{ $currentCategory->title ?? __('ecommerce::ecommerce.categories.categories') }}

{{ $currentCategory->description ?? __('ecommerce::ecommerce.categories_desc') }}
@lang('ecommerce::ecommerce.categories.all_categories') @foreach(collect($subCategories ?? []) as $category){{ $title($category->title) }}@endforeach

@lang('ecommerce::ecommerce.items_label')

@forelse($products as $product)
{{ $title($product->title) }}@if(!$product->isInStock())@lang('ecommerce::ecommerce.out_of_stock')@endif

{{ Str::limit($title($product->title), 38) }}

★★★★★ ({{ number_format((float) ($product->rating ?? 4.8), 1) }})
{{ \App\Domain\AppBase\Models\Setting\Currency::format((float) ($product->price ?? $product->default_price ?? 0)) }}
@csrf@if(!$product->isInStock())@else@endif
@empty
@lang('ecommerce::ecommerce.no_matching_products')
@endforelse
@if($products->hasPages()) @endif
@endsection @section('scripts') @endsection