@php use App\Services\CartService; use App\Services\StoreService; use App\Services\MediaService; use App\Services\TranslationService; use App\Models\Store; $store_id = session('store_id'); $store_details = app(StoreService::class)->getCurrentStoreData($store_id); $store_details = json_decode($store_details) ?? ''; $language_code = app(TranslationService::class)->getLanguageCode(); @endphp
@php $cart_count = '0'; @endphp @auth @php $user_id = auth()->id() ?? 0; $store_id = session('store_id') ?? ''; $favorites = getFavorites(user_id: $user_id, store_id: $store_id); $cart_count = app(CartService::class)->getCartCount($user_id, $store_id); @endphp @endauth
@if ( $settings->twitter_link !== null || $settings->facebook_link !== null || $settings->instagram_link !== null || $settings->youtube_link !== null)
@endif
{{ $settings->return_title }} | {{ $settings->support_title }}
  • {{ session('locale') ?? ($languages[0]->code ?? 'en') }}
    @foreach ($languages as $language)
  • {{ $language->code }}
  • @endforeach
  • {{ session('currency') ?? ($system_settings['currency_setting']['code'] ?? 'USD') }}
@if (count($currencies) > 1)
    @foreach ($currencies as $currency)
  • {{ $currency->code }}
  • @endforeach
@endif
{{-- @dd($store_details) --}} @php $img = !empty($store_details[0]->half_store_logo) && file_exists( public_path(config('constants.STORE_IMG_PATH') . $store_details[0]->half_store_logo), ) ? app(MediaService::class)->getImageUrl( $store_details[0]->half_store_logo, '', '', 'image', 'STORE_IMG_PATH', ) : app(MediaService::class)->getImageUrl($settings->logo); $img = app(MediaService::class)->dynamic_image($img, 150); @endphp
@php $cart_count = '0'; @endphp @auth @php $user_id = auth()->id() ?? 0; $store_id = session('store_id') ?? ''; $favorites = getFavorites(user_id: $user_id, store_id: $store_id); $cart_count = app(CartService::class)->getCartCount($user_id, $store_id); @endphp @endauth
{{-- search --}} @if (isset($stores) && count($stores) >= 2 && url()->full() == customUrl(url()->full()) && session()->get('show_store_popup')) @endif @if (isset($stores) && count($stores) >= 2 && url()->full() == customUrl(url()->full()) && session()->get('show_store_popup')) @php session()->put('show_store_popup', false); @endphp @endif