Add method to get offers by articles with siblings, enhance display

This commit is contained in:
Ludovic CANDELLIER
2022-01-30 22:48:04 +01:00
parent 5e5f12ddb2
commit b4856266c8
11 changed files with 129 additions and 60 deletions

View File

@@ -8,7 +8,7 @@
<div class="card-body">
<div class="row card-title">
<div class="col-10" style="font-weight: bold; color: green;">
<h2 style="font-size: 1.4em;">{{ $article['parent_name'] }}</h2>
<h2 style="font-size: 1.3em;">{{ $article['parent_name'] }}</h2>
{{ $article['product_name'] }}
</div>
<div class="col-2 p-0 text-right" style="font-size: 2em; color: red;">

View File

@@ -1,55 +1,49 @@
<a href="{{ route('Shop.Articles.show', ['id' => $article['semences']['article_id'] ?? false ]) }}">
<div class="row pb-3">
<div class="col-12">
<div class="card-title" style="font-weight: bold; color: green;">{{ $product_name }}</div>
<div class="row pb-3" style="background-color: #CCC;">
<div class="col-8">
<div class="row pt-2">
<div class="col-10">
<a href="{{ route('Shop.Articles.show', ['id' => $article['semences']['article_id'] ?? false ]) }}" class="text-decoration-none">
<div style="font-weight: bold; color: green; font-size: 1.5em;">{{ $product_name }}</div>
</a>
</div>
<div class="col-2 text-right">
<span style="font-size: 2em; color: red;">
<i class="fa fa-heart"></i>
</span>
</div>
</div>
<div class="col-12">
<a href="{{ route('Shop.Articles.show', ['id' => $article['semences']['article_id'] ?? false ]) }}" class="text-decoration-none">
<div class="row">
<div class="col-8">
<div class="row">
<div class="col-2">
<div class="row">
<div class="col-9">
<img src="{{ App\Repositories\Shop\Articles::getPreviewSrc($article['image'] ?? false) }}" class="card-img-top" alt="...">
</div>
<div class="col-3 text-center">
<span style="font-size: 2em; color: red;">
<i class="fa fa-heart"></i>
</span>
</div>
</div>
</div>
<div class="col-10">
{!! $article['description'] !!}
</div>
<div class="col-2">
<img src="{{ App\Repositories\Shop\Articles::getPreviewSrc($article['image'] ?? false) }}" class="card-img-top" alt="...">
</div>
<div class="col-10">
{!! $article['description'] !!}
</div>
</div>
</a>
</div>
<div class="col-4">
<div class="row h-100" style="color: green; display: flex;">
<div class="col-6 text-center" style="background-color: rgba(0,128,0,0.3); margin: auto;">
@if ($article['semences'] ?? false)
<span style="font-size: 1.4em; font-weight: bold;">{{ $article['semences']['price'] ?? null }}</span> <br>
{{ $article['semences']['variation'] }}
<div>
Quantité :
</div>
</div>
<div class="col-4">
<p class="card-text">
<div class="row" style="color: green;">
<div class="col-6 text-center">
@if ($article['semences'] ?? false)
<span style="font-size: 1.4em; font-weight: bold;">{{ $article['semences']['price'] ?? null }}</span> <br>
{{ $article['semences']['variation'] }}
<div>
Quantité :
</div>
@include('components.form.button', [
'class' => 'btn-success basket semences',
'txt' => 'Ajouter au panier',
])
@endif
</div>
<div class="col-6 text-center">
@if ($article['plants'] ?? false)
<span style="font-size: 1.4em; font-weight: bold;">{{ $article['plants']['price'] }}</span> <br>
{{ $article['plants']['variation'] }}
@endif
</div>
</div>
</p>
</div>
@include('components.form.button', [
'class' => 'btn-success basket semences',
'txt' => 'Ajouter au panier',
])
@endif
</div>
<div class="col-6 text-center">
@if ($article['plants'] ?? false)
<span style="font-size: 1.4em; font-weight: bold;">{{ $article['plants']['price'] }}</span> <br>
{{ $article['plants']['variation'] }}
@endif
</div>
</div>
</div>
</a>
</div>