Filters collapsed, customer auth and register, fix on basket recalculation
This commit is contained in:
@@ -195,7 +195,7 @@ class Articles
|
||||
$model = ($options['homepage'] ?? false) ? Article::homepage()->visible() : Article::visible();
|
||||
|
||||
// exit;
|
||||
$data = $model->byCategory($category_id)->byTags($tags)->withAvailableOffers($sale_channel_id)->with([
|
||||
$data = $model->byCategoryParent($category_id)->byTags($tags)->withAvailableOffers($sale_channel_id)->with([
|
||||
'image',
|
||||
'product',
|
||||
'article_nature',
|
||||
|
||||
@@ -31,7 +31,8 @@ class Offers
|
||||
'tariff.price_lists.price_list_values',
|
||||
'variation',
|
||||
])->find($id);
|
||||
$offer->article->image = Articles::getFullImageByArticle($offer->article);
|
||||
$images = Articles::getFullImagesByArticle($offer->article);
|
||||
$offer->article->image = Articles::getPreviewSrc($images[0] ?? false);
|
||||
return $offer;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class TagGroups
|
||||
return TagGroup::get()->SortBy('name')->pluck('name', 'id')->toArray();
|
||||
}
|
||||
|
||||
public static function getWithTagsAndCountOffers()
|
||||
public static function getWithTagsAndCountOffers($category_id = false)
|
||||
{
|
||||
$tags = Tag::withCount(['articles'])->get()->toArray();
|
||||
$tag_groups = TagGroup::pluck('name', 'id')->toArray();
|
||||
|
||||
Reference in New Issue
Block a user