@php $sidebarCartItems = array_values((array) session('cart', [])); $sidebarItemCount = collect($sidebarCartItems)->sum(fn($item) => (int) ($item['quantity'] ?? 0)); $sidebarCartTotal = collect($sidebarCartItems)->sum(function ($item) { return ((float) ($item['unit_price'] ?? 0)) * ((int) ($item['quantity'] ?? 0)); }); @endphp {{-- Shop Hero Header --}}
@php $shopLogo = $shop->logo ? (\Illuminate\Support\Str::startsWith($shop->logo, ['http://', 'https://']) ? $shop->logo : asset('storage/' . $shop->logo)) : 'https://images.unsplash.com/photo-1472851294608-062f824d29cc?w=200&q=80'; @endphp

{{ $shop->name }}

{{ data_get($shop->contact, 'address', 'Quality products from trusted seller') }}

{{ $products->count() }} Products
Fast Delivery
{{-- Products Section --}}
@if ($products->count() > 0)

Available Products

@foreach ($products as $product) @php $hasOffer = !is_null($product->offer_price) && $product->offer_price < $product->price && (is_null($product->offer_expiry_date) || $product->offer_expiry_date->isFuture()); $featureImage = $product->feature_image ? (\Illuminate\Support\Str::startsWith($product->feature_image, ['http://', 'https://']) ? $product->feature_image : asset('storage/' . $product->feature_image)) : null; $galleryImage = optional($product->images->first())->image_path; $galleryImageUrl = $galleryImage ? (\Illuminate\Support\Str::startsWith($galleryImage, ['http://', 'https://']) ? $galleryImage : asset('storage/' . $galleryImage)) : null; $productImage = $featureImage ?: $galleryImageUrl ?: 'https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=600&q=80'; @endphp
{{ $product->product_title }} @if ($hasOffer) Sale @endif

{{ $product->product_title }}

@if ($hasOffer) {{ number_format((float) $product->offer_price, 0) }}৳ {{ number_format((float) $product->price, 0) }}৳ @else {{ number_format((float) $product->price, 0) }}৳ @endif
@csrf
View
@endforeach
@else

No Products Available

This shop doesn't have any in-stock products at the moment.

Explore Other Shops
@endif