Add display articles by rows, and display article in full mode
This commit is contained in:
@@ -51,7 +51,9 @@ class Articles
|
||||
{
|
||||
$article = self::get($id);
|
||||
$data = $article->toArray();
|
||||
$data['description'] = (!empty($article->description)) ? $article->description : $article->product->description;
|
||||
$data['image'] = Articles::getPreview($article->image);
|
||||
$data['image_big'] = Articles::getImage($article->image);
|
||||
$data['inherited'] = self::getInherited($id);
|
||||
$data['categories'] = self::getCategoriesNameByArticle($article);
|
||||
$data['tags'] = self::getTagsNameByArticle($article);
|
||||
@@ -63,6 +65,7 @@ class Articles
|
||||
{
|
||||
$articles = self::getArticlesWithOffers();
|
||||
// dump($articles->toArray());
|
||||
// exit;
|
||||
foreach ($articles as $article) {
|
||||
$price_lists = $article->offers[0]->tariff->price_lists->toArray();
|
||||
// dump($price_lists);
|
||||
@@ -81,6 +84,7 @@ class Articles
|
||||
'offer_id' => $article->offers[0]->id,
|
||||
'quantity' => $prices['quantity'],
|
||||
'price' => $prices['price_taxed'],
|
||||
'variation' => $article->offers[0]->variation->name,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -95,7 +99,7 @@ class Articles
|
||||
'image',
|
||||
'product',
|
||||
'article_nature',
|
||||
'offers.variation',
|
||||
'offers.variation.package',
|
||||
'offers.tariff.price_lists.price_list_values',
|
||||
])->get();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user