@extends('frontend.theme_2.app') @section('title', $shop->shop_name ?? 'Shop Details') @section('content')
{{ $shop->shop_name }}

{{ $shop->shop_name }} {{ $shop->address }}, {{ $shop->cityRelation->name ?? '' }}, {{ $shop->countryRelation->name ?? '' }}

@php $ratingValue = $shop->ratings_avg_rating ?? 0; @endphp
@php $rating = $shop->ratings_avg_rating ?? 0; $fullStars = floor($rating); $halfStar = $rating - $fullStars >= 0.5; $emptyStars = 5 - $fullStars - ($halfStar ? 1 : 0); @endphp @for ($i = 0; $i < $fullStars; $i++) @endfor @if ($halfStar) @endif @for ($i = 0; $i < $emptyStars; $i++) @endfor

{{ number_format($rating, 1) }} ()

@if(!empty($shop->gallery))
@endif
Overview

{!! nl2br(e($shop->description)) !!}

Products Offered
@forelse($actualProducts as $product)
@php $productImagePath = $product->product_image_url ?? null; $fullPath = null; if ($productImagePath) { $directory = dirname($productImagePath); $filename = basename($productImagePath); $modifiedPath = $directory . '/fixed/' . $filename; $fullPath = 'storage/' . $modifiedPath; } $defaultImagePath = 'assets/img/default-image.png'; @endphp
@if ($product->ratings_count > 0)
@php $rating = round($product->avg_rating * 2) / 2; @endphp @for ($i = 1; $i <= 5; $i++) @if ($i <=$rating) @elseif ($i - 0.5 == $rating) @else @endif @endfor

{{ number_format($product->avg_rating, 1) }} ({{ $product->ratings_count }} {{ $product->ratings_count == 1 ? __('review') : __('Reviews') }})

@else
@for ($i = 1; $i <= 5; $i++) @endfor

0.0 (0 {{ __('review') }})

@endif
{{ $product->source_name }}
{{ $currency_code ?? '$' }}{{ $product->source_price }}
@empty

No products available from this shop yet.

@endforelse
Services Provided
@forelse($services as $service)
{{ $service->source_name }}
{{ $service->category_name ?? 'Service' }}
{{ $service->source_name }}
{{ $shop->shop_name }}
{{ $shop->shop_name }}
@if ($service->ratings_count > 0)

{{ number_format($service->avg_rating, 1) }} ({{ $service->ratings_count }} {{ $service->ratings_count == 1 ? 'Review' : 'Reviews' }})

@else

0.0 (0 Reviews)

@endif

Starts From

{{ $currency_code ?? '$' }}{{ $service->source_price }}
@empty

No services found for this shop.

@endforelse
{{ $shop->shop_name ? __('for') . ' ' . $shop->shop_name : '' }}
{{ __('Customer Reviews & Ratings') }}

0.0 / 5.0

{{ __('basedon') }} 0 {{ __('review') }}

5 {{ __('Star Ratings') }}

0

4 {{ __('Star Ratings') }}

0

3 {{ __('Star Ratings') }}

0

2 {{ __('Star Ratings') }}

0

1 {{ __('Star Ratings') }}

0

Business Hours
@php $allDays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; $workingHours = json_decode($shop->working_day, true) ?? []; @endphp @foreach($allDays as $day) @php $dayKey = strtolower($day); @endphp

{{ $day }} @if(isset($workingHours[$dayKey]) && !empty($workingHours[$dayKey]['start_time']) && !empty($workingHours[$dayKey]['end_time'])) {{ \Carbon\Carbon::parse($workingHours[$dayKey]['start_time'])->format('h:i A') }} - {{ \Carbon\Carbon::parse($workingHours[$dayKey]['end_time'])->format('h:i A') }} @else Closed @endif

@endforeach
@php $imageMap = [ 'whatsapp' => 'assets/img/social/social-img-4.svg', 'facebook' => 'assets/img/social/social-img-1.svg', 'instagram' => 'assets/img/social/social-img-2.svg', 'twitter' => 'assets/img/social/social-img-3.svg', 'telegram' => 'assets/img/social/social-img-5.svg', 'linkedin' => 'assets/img/social/social-img-6.svg', ]; @endphp
Social Profiles
Owner Details
user
{{ ucfirst($shop->owner_name) ?? 'N/A' }}

Shop Since : {{ $shop->created_at?->format('j F Y') ?? 'N/A' }}

Address

{{ ucfirst($shop->address) }}

@if(!empty($full_address)) @php $mapQuery = urlencode($full_address); @endphp @endif Contact Owner
@endsection @push('scripts') @endpush