@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.items_label')
@forelse($products as $product)
@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)) }}
@empty
@lang('ecommerce::ecommerce.no_matching_products')
@endforelse
@if($products->hasPages())
@endif
@endsection
@section('scripts')
@endsection