@extends('front.layout.master') @section('title', ($deal->title ?? __('Flash Deal')) . ' | ' . config('app.name')) @section('meta_tags') @if($deal->background_image && file_exists(public_path('images/flashdeals/' . $deal->background_image))) @endif @endsection @section('body') @php $cover = ($deal->background_image && file_exists(public_path('images/flashdeals/' . $deal->background_image))) ? url('images/flashdeals/' . $deal->background_image) : null; $isLive = strtotime($deal->end_date) >= time(); $startsLater = strtotime($deal->start_date) > time(); $itemsCount = ($deal->saleitems ?? collect())->count(); $currencySym = session()->get('currency')['value'] ?? ''; $currencyPos = session()->get('currency')['position'] ?? 'before'; // Currency may be stored as a Font Awesome class (e.g. "fa fa-dollar") rather than a glyph; // map common ones to Unicode so price strings stay plain text. $currencyGlyphMap = [ 'fa fa-dollar' => '$', 'fa-dollar' => '$', 'fa fa-rupee' => '₹', 'fa-rupee' => '₹', 'fa fa-inr' => '₹', 'fa fa-euro' => '€', 'fa-euro' => '€', 'fa fa-eur' => '€', 'fa fa-gbp' => '£', 'fa-gbp' => '£', 'fa fa-pound' => '£', 'fa fa-yen' => '¥', 'fa-yen' => '¥', 'fa fa-jpy' => '¥', 'fa fa-cny' => '¥', 'fa fa-bitcoin' => '₿', 'fa-bitcoin' => '₿', ]; $sym = $currencyGlyphMap[strtolower(trim((string) $currencySym))] ?? $currencySym; if (str_starts_with($sym, 'fa') || str_contains($sym, 'fa-')) $sym = '$'; // last-resort fallback $currencySym = $sym; $formatPrice = function ($amount) use ($currencySym, $currencyPos) { $n = number_format((float) $amount, 2); return $currencyPos === 'after' ? ($n . ' ' . $currencySym) : ($currencySym . ' ' . $n); }; @endphp {{-- Breadcrumb --}}
{{ __('Items have not been added to this campaign yet.') }}
← {{ __('Back to all deals') }}