fix: add "Bientôt disponible" box on public product page without prices
This commit is contained in:
@@ -1,3 +1,24 @@
|
|||||||
|
@php
|
||||||
|
// Check if article is not visible OR has no offers at all
|
||||||
|
$hasNoOffers = empty($article['offers']['semences'] ?? false)
|
||||||
|
&& empty($article['offers']['plants'] ?? false)
|
||||||
|
&& empty($article['offers']['legumes'] ?? false)
|
||||||
|
&& empty($article['offers']['marchandise'] ?? false);
|
||||||
|
$shouldShowComingSoon = !($article['visible'] ?? true) || $hasNoOffers;
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if ($shouldShowComingSoon)
|
||||||
|
{{-- Display "Coming Soon" box when article is not visible or has no offers --}}
|
||||||
|
<div class="card border-info">
|
||||||
|
<div class="card-body text-center p-4">
|
||||||
|
<h4 class="text-info mb-3">
|
||||||
|
<i class="fas fa-clock"></i>
|
||||||
|
</h4>
|
||||||
|
<h5 class="card-title mb-0">Bientôt disponible</h5>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
{{-- Display normal offers for visible articles with available offers --}}
|
||||||
@if ($article['offers']['semences'] ?? false)
|
@if ($article['offers']['semences'] ?? false)
|
||||||
@include('Shop.Articles.partials.addBasket', [
|
@include('Shop.Articles.partials.addBasket', [
|
||||||
'data' => $article['offers']['semences'],
|
'data' => $article['offers']['semences'],
|
||||||
@@ -33,6 +54,7 @@
|
|||||||
'bgClass' => 'bg-green-light',
|
'bgClass' => 'bg-green-light',
|
||||||
])
|
])
|
||||||
@endif
|
@endif
|
||||||
|
@endif
|
||||||
|
|
||||||
@include('load.basket')
|
@include('load.basket')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user