@php
$imgSource = $product->featured_image ?: $product->image;
$imgSrc = null;
if ($imgSource) {
if (str_starts_with($imgSource, 'data:') || str_starts_with($imgSource, 'http')) {
$imgSrc = $imgSource;
} elseif (str_starts_with($imgSource, '/storage/')) {
$imgSrc = asset(substr($imgSource, 1));
} else {
$imgSrc = asset('storage/' . $imgSource);
}
}
@endphp
@if($imgSrc)
{{ $product->is_digital ? 'Digital' : 'Físico' }}
@if($hasCoupon)
Cupão
@endif
@if($hasActiveDiscount)
-{{ $discountPercent }}%
@elseif($hasScheduledDiscount)
Breve
@endif
{{ $product->name }}
{{ Str::limit($product->description, 40) }}
@if($hasActiveDiscount)
{{ number_format($product->price, 2) }}€
{{ number_format($product->discount_price, 2) }}€
@else
{{ number_format($product->price, 2) }}€
@endif
@if($hasActiveDiscount && $product->getDiscountEndFormatted())
Termina {{ $product->getDiscountEndFormatted() }}
@elseif($hasScheduledDiscount)
Inicia {{ $product->getDiscountStartFormatted() }}
@endif
@if($product->shipping_cost > 0)
Envio: {{ number_format($product->shipping_cost, 2) }}€
@else
Envio Grátis
@endif
Ver Produto
@if($product->is_used)
USADO
@endif
@php
$productUrl = urlencode(route('product', $product->slug));
$productName = urlencode($product->name);
@endphp
@if($product->share_facebook)
@else
@endif
@if($product->share_whatsapp)
@else
@endif
@if($product->share_instagram)
@else
@endif