@php $activeBanner = \App\Models\Banner::getActive(); @endphp @if($activeBanner)
@if($activeBanner->image) {{ $activeBanner->title }} @if($activeBanner->title || $activeBanner->message)
@if($activeBanner->title) {{ $activeBanner->title }} @endif @if($activeBanner->title && $activeBanner->message) | @endif @if($activeBanner->message) {{ $activeBanner->message }} @endif
@endif
@else
@if($activeBanner->link) @if($activeBanner->title){{ $activeBanner->title }} - @endif {{ $activeBanner->message }} @else @if($activeBanner->title){{ $activeBanner->title }} - @endif {{ $activeBanner->message }} @endif
@endif
@endif
@if($product->image) {{ $product->name }} @else
@endif @if($product->hasDiscount())
-{{ $product->getDiscountPercent() }}% DESCONTO
@endif
Partilhar Produto
@if($product->share_facebook) @endif @if($product->share_whatsapp) @endif @if($product->share_instagram) @endif
@if($product->is_digital) @if($product->file_url && !$product->file_path) Acesso por Link @else Digital @endif @endif @if($product->is_used) Usado @endif @if($product->is_featured) Destaque @endif

{{ $product->name }}

@if($product->hasDiscount()) {{ number_format($product->price, 2) }}€ {{ number_format($product->discount_price, 2) }}€ @if($product->getDiscountEndFormatted())
Desconto termina em {{ $product->getDiscountEndFormatted() }} @endif @elseif($product->hasScheduledDiscount()) {{ number_format($product->price, 2) }}€
Desconto de -{{ $product->getDiscountPercent() }}% inicia em {{ $product->getDiscountStartFormatted() }} @else {{ number_format($product->price, 2) }}€ @endif @if(\App\Helpers\PriceHelper::isIvaEnabled() && $product->iva_type === 'included') IVA incluído @endif

{{ $product->description }}

@if($coupons->count() > 0)
Cupões disponíveis
@foreach($coupons as $coupon)
{{ $coupon->getDisplayValue() }} @if($coupon->description) {{ $coupon->description }} @endif
{{ $coupon->code }}
@if(!$loop->last)
@endif @endforeach Insira o código no carrinho para aplicar o desconto
@endif @if(!$product->is_digital)
@if($product->isLowStock()) Últimas {{ $product->stock }} unidades! Stock limitado @elseif($product->stock > 0) {{ $product->stock }} unidades em stock @else Esgotado @endif
@endif
👁️ {{ $activeViews }} pessoa(s) a ver isto agora
@if($product->variants->count() > 0)
@foreach($product->variants as $variant)
@foreach($variant->values as $value) @if($variant->type === 'color') @elseif($variant->type === 'image') @else @endif @endforeach
@endforeach
@endif @if(($product->is_digital || $product->stock > 0) && $product->is_active) @auth
@csrf @if(!$product->is_digital) @else @endif
@else
@csrf @if(!$product->is_digital) @else @endif
@endif @if(\App\Models\Setting::get('whatsapp_enabled') === '1') Comprar por WhatsApp @endif @else @endif @if($product->video_url)
Vídeo de Demonstração
@php $embedUrl = $product->video_url; if (preg_match('/(?:youtube\.com\/watch\?v=|youtu\.be\/)([\w-]+)/', $product->video_url, $matches)) { $embedUrl = 'https://www.youtube.com/embed/' . $matches[1]; } elseif (preg_match('/vimeo\.com\/(\d+)/', $product->video_url, $matches)) { $embedUrl = 'https://player.vimeo.com/video/' . $matches[1]; } elseif (str_starts_with($embedUrl, 'http://')) { $embedUrl = str_replace('http://', 'https://', $embedUrl); } @endphp
@endif
@if(\App\Models\Setting::get('whatsapp_enabled') === '1')
Atendimento

Precisa de ajuda? Fale connosco!

Contactar por WhatsApp
@endif

Avaliações e Comentários

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @php $avgRating = $product->avgRating(); @endphp @if($avgRating > 0)
@for($i = 1; $i <= 5; $i++) @endfor {{ number_format($avgRating, 1) }} ({{ $product->reviewsCount() }} avaliações)
@endif @forelse($product->approvedReviews as $review)
@for($i = 1; $i <= 5; $i++) @endfor {{ $review->title ?? 'Sem título' }}
{{ $review->created_at->format('d/m/Y') }}

{{ $review->comment }}

— {{ $review->user->name }}
@empty

Nenhuma avaliação ainda.

@endforelse @auth @php $userReview = $product->reviews->where('user_id', auth()->id())->first(); @endphp @if(!$userReview)
Deixar Avaliação
@csrf
@for($i = 5; $i >= 1; $i--) @endfor
@else
Já avaliaste este produto.
@endif @else
Inicia sessão para deixares uma avaliação.
@endauth
@if($relatedProducts->count() > 0)

Produtos Relacionados

@foreach($relatedProducts as $related)
@if($related->image) {{ $related->name }} @else
@endif
{{ $related->name }}

@if($related->hasDiscount()) {{ number_format($related->price, 2) }}€ {{ number_format($related->discount_price, 2) }}€ @else {{ number_format($related->price, 2) }}€ @endif

Ver
@endforeach
@endif