Add display of shelve
This commit is contained in:
@@ -61,9 +61,9 @@ class Articles
|
||||
return $data;
|
||||
}
|
||||
|
||||
public static function getArticlesToSell()
|
||||
public static function getArticlesToSell($category_id = false, $tags = false)
|
||||
{
|
||||
$articles = self::getArticlesWithOffers();
|
||||
$articles = self::getArticlesWithOffers($category_id, $tags);
|
||||
foreach ($articles as $article) {
|
||||
$price_lists = $article->offers[0]->tariff->price_lists->toArray();
|
||||
// dump($price_lists);
|
||||
@@ -93,9 +93,9 @@ class Articles
|
||||
return $data;
|
||||
}
|
||||
|
||||
public static function getArticlesWithOffers()
|
||||
public static function getArticlesWithOffers($category_id = false, $tags = false)
|
||||
{
|
||||
return Article::visible()->withAvailableOffers()->with([
|
||||
return Article::byCategory($category_id)->byTags($tags)->visible()->withAvailableOffers()->with([
|
||||
'image',
|
||||
'product',
|
||||
'article_nature',
|
||||
|
||||
Reference in New Issue
Block a user