This commit is contained in:
Ludovic CANDELLIER
2022-03-30 15:59:31 +02:00
parent e312572bcc
commit c8cd3e4fa6
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)
@@ -197,7 +197,7 @@ class Articles
$model = ($options['homepage'] ?? false) ? Article::homepage()->visible() : Article::visible();
// 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',
'product',
'article_nature',
@@ -210,8 +210,10 @@ class Articles
'offers.tariff.price_lists' => function ($query) use ($sale_channel_id) {
$query->where('sale_channel_id', $sale_channel_id);
},
'offers.tariff.price_lists.price_list_values',
'offers.variation.package',
])->get();
return $data;
}

View File

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