This commit is contained in:
Ludovic CANDELLIER
2022-03-30 15:59:31 +02:00
parent 081df4d5d0
commit c12b45f8ad
2 changed files with 6 additions and 4 deletions

View File

@@ -162,7 +162,7 @@ class Articles
} }
} }
*/ */
return $data ?? false; return $articles ?? false;
} }
public static function getDataForSale($article) public static function getDataForSale($article)
@@ -197,7 +197,7 @@ class Articles
$model = ($options['homepage'] ?? false) ? Article::homepage()->visible() : Article::visible(); $model = ($options['homepage'] ?? false) ? Article::homepage()->visible() : Article::visible();
// exit; // exit;
return $model->byCategory($category_id)->byTags($tags)->withAvailableOffers($sale_channel_id)->with([ $data = $model->byCategory($category_id)->byTags($tags)->withAvailableOffers($sale_channel_id)->with([
'image', 'image',
'product', 'product',
'article_nature', 'article_nature',
@@ -210,8 +210,10 @@ class Articles
'offers.tariff.price_lists' => function ($query) use ($sale_channel_id) { 'offers.tariff.price_lists' => function ($query) use ($sale_channel_id) {
$query->where('sale_channel_id', $sale_channel_id); $query->where('sale_channel_id', $sale_channel_id);
}, },
'offers.tariff.price_lists.price_list_values',
'offers.variation.package', 'offers.variation.package',
])->get(); ])->get();
return $data;
} }

View File

@@ -5,8 +5,8 @@
<h1 style="font-size: 2em;">{{ $shelve['name'] }}</h1> <h1 style="font-size: 2em;">{{ $shelve['name'] }}</h1>
</div> </div>
<div class="col-6 text-right"> <div class="col-6 text-right">
<a href="{{ route('') }}">Découvrir la sélection</a> <a href="{{ route('Shop.Categories.show', ['id' => $shelve['id']]) }}">Découvrir la sélection</a>
<a href="">Tout voir</a> <a href="{{ route('Shop.Categories.show', ['id' => $shelve['id']]) }}">Tout voir</a>
</div> </div>
</div> </div>
<div class="row shelve_slider_{{ $shelve['id'] }}"> <div class="row shelve_slider_{{ $shelve['id'] }}">