@php $currency = app(\App\Support\AppSettings::class)->get('currency', 'USD'); $lowStock = (int) $product->stock <= 5; $imageUrl = $product->image_path ? (Str::startsWith($product->image_path, ['http://', 'https://']) ? $product->image_path : asset($product->image_path)) : null; $imageUrl = $imageUrl ?: ($product->images->first()?->image_path ? asset($product->images->first()->image_path) : null); @endphp
@if ($imageUrl) {{ $product->brand_name }} @else @endif @if ($product->is_featured) Bestseller @endif @if ($product->medicine?->requires_rx) Rx @endif

{{ $product->medicine?->category }}

{{ $product->brand_name }}

{{ $product->medicine?->generic_name }} {{ $product->medicine?->strength }}

{{ $currency }} {{ number_format((float) $product->price, 2) }}

{{ $lowStock ? 'Only '.$product->stock.' left' : 'In stock' }}

@csrf