feat: add new mainpage products options, hide attributes
This commit is contained in:
@@ -381,6 +381,7 @@ HTML,
|
||||
'type' => 'select',
|
||||
'options' => [
|
||||
'most_viewed' => 'Популярные товары',
|
||||
'latest' => 'Последние сверху',
|
||||
'featured' => 'Избранные товары (задать в поле ниже)',
|
||||
],
|
||||
'help' => 'Выберите, какие товары показывать на главной странице магазина в Telegram. Это влияет на первую видимую секцию каталога для пользователя.',
|
||||
|
||||
@@ -108,7 +108,7 @@ class ProductsHandler
|
||||
|
||||
$products = $productsQuery
|
||||
->forPage($page, $perPage)
|
||||
->orderBy('viewed', 'DESC')
|
||||
->orderBy($mainpageProducts === 'latest' ? 'date_modified' : 'viewed', 'DESC')
|
||||
->get();
|
||||
|
||||
$productIds = Arr::pluck($products, 'product_id');
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<div v-if="product.attributes && product.attributes.length > 0" class="mt-3">
|
||||
<h3 class="font-bold mb-2">Характеристики</h3>
|
||||
|
||||
<div class="space-y-6">
|
||||
|
||||
Reference in New Issue
Block a user