@if (count($latest_offers) < 1)

{{ __('messages.no_offers_available') }}

@else @php function getDiscountPercentage($originalPrice, $discountedPrice) { return $originalPrice > 0 ? round((($originalPrice - $discountedPrice) / $originalPrice) * 100) : 0; } @endphp

{{ __('messages.latest_offers') }}

{{ __('messages.show_all') }}
@foreach ($latest_offers as $offer)
@if ($offer['is_new'] = 1) {{ __('messages.new') }} @endif @if ($offer['is_featured'] = 1) {{ __('messages.featured') }} @endif @if($offer['price'] > $offer['discounted_price']) -{{ getDiscountPercentage($offer['price'], $offer['discounted_price']) }}% @endif
{{ $offer['name'] }}
{{ $offer['name'] }}

{{ strip_tags($offer['description']) }}

@if(isset($offer['discounted_price']) && isset($offer['price']) && $offer['price'] > $offer['discounted_price'])

{{ number_format($offer['discounted_price'], 1) }} {{ $offer['symbol'] }}

{{ number_format($offer['price'], 1) }} {{ $offer['symbol'] }}
@elseif(isset($offer['discounted_price']))

{{ number_format($offer['discounted_price'], 1) }} {{ $offer['symbol'] }}

@endif

{{ __('messages.offer_from') }}

{{ $offer['store'] }}
@endforeach
@endif