add watermark on zoom, update display of article nature on shelve (change icon to text
This commit is contained in:
@@ -81,7 +81,7 @@ class Articles
|
||||
$images = ArticleImages::getFullImagesByArticle($article);
|
||||
$data['image'] = self::getPreviewSrc($images[0] ?? false);
|
||||
$data['images'] = count($images) ? $images : false;
|
||||
$data['image_big'] = self::getImageSrc($images[0] ?? false);
|
||||
$data['image_big'] = self::getZoomSrc($images[0] ?? false);
|
||||
$data['inherited'] = ArticleInherited::getInherited($id);
|
||||
$data['categories'] = ArticleCategories::getCategoriesNameByArticle($article);
|
||||
$data['tags'] = ArticleTags::getFullTagsSlugByArticle($article);
|
||||
@@ -143,7 +143,7 @@ class Articles
|
||||
public static function getArticlesToSell($options)
|
||||
{
|
||||
$articles = self::getArticlesWithOffers($options);
|
||||
$searchOrder = array_flip($options['ids']->toArray() ?? []);
|
||||
$searchOrder = $options['ids'] ?? false ? array_flip($options['ids']->toArray()) : false;
|
||||
foreach ($articles as $article) {
|
||||
$price_lists = $article->offers[0]->tariff->price_lists->toArray();
|
||||
if (! count($price_lists)) {
|
||||
@@ -151,7 +151,9 @@ class Articles
|
||||
}
|
||||
if (! is_array($data[$article->name] ?? false)) {
|
||||
$data[$article->name] = self::getDataForSale($article);
|
||||
$data[$article->name]['searchOrder'] = $searchOrder[$article->id];
|
||||
if ($searchOrder) {
|
||||
$data[$article->name]['searchOrder'] = $searchOrder[$article->id];
|
||||
}
|
||||
}
|
||||
$prices = $price_lists[0]['price_list_values'][0];
|
||||
$article_nature_name = strtolower($article->article_nature->name);
|
||||
|
||||
@@ -7,7 +7,7 @@ class Shelves
|
||||
public static function getOffersByCategoryAndNature($categoryId, $articleNatureId = false, $tags = [], $articleNature = false, $displayByRows = false)
|
||||
{
|
||||
$articleNatures = Articles::getArticleNaturesWithOffers(['category_id' => $categoryId]);
|
||||
$productType = self::getProductType($articleNature, $articleNatures);
|
||||
$productType = self::getProductType($articleNatureId, $articleNature, $articleNatures);
|
||||
$articleNatureId = $articleNatureId ?
|
||||
$articleNatureId :
|
||||
self::getArticleNatureId($articleNature, $articleNatures);
|
||||
|
||||
Reference in New Issue
Block a user