Ильяc (27 Февраль 2016 - 15:43) писал:
Как сделать чтобы при открытии сайта все товары, находящиеся в "Товары на главной" показывались сразу, а не нужно было нажимать кнопку "Показать еще"? В метрике заметно, что очень мало людей ее нажимают и уходят по другим ссылкам искать что-то.
Здравствуйте. Это можно сделать вручную: в шаблоне
mail.css замените блок кода:
.item.item-animate.show-addtocart:nth-child(1), .item.item-animate.show-addtocart:nth-child(2), .item.item-animate.show-addtocart:nth-child(3),
.item.item-animate.show-addtocart:nth-child(4), .item.item-animate.show-addtocart:nth-child(5), .item.item-animate.show-addtocart:nth-child(6),
.item.item-animate.show-addtocart:nth-child(7), .item.item-animate.show-addtocart:nth-child(8) {display:block;}
на:
.item.item-animate.show-addtocart:nth-child(1), .item.item-animate.show-addtocart:nth-child(2), .item.item-animate.show-addtocart:nth-child(3), .item.item-animate.show-addtocart:nth-child(4),
.item.item-animate.show-addtocart:nth-child(5), .item.item-animate.show-addtocart:nth-child(6), .item.item-animate.show-addtocart:nth-child(7), .item.item-animate.show-addtocart:nth-child(8),
.item.item-animate.show-addtocart:nth-child(9), .item.item-animate.show-addtocart:nth-child(10), .item.item-animate.show-addtocart:nth-child(11), .item.item-animate.show-addtocart:nth-child(12),
.item.item-animate.show-addtocart:nth-child(13), .item.item-animate.show-addtocart:nth-child(14), .item.item-animate.show-addtocart:nth-child(15), .item.item-animate.show-addtocart:nth-child(16),
.item.item-animate.show-addtocart:nth-child(17), .item.item-animate.show-addtocart:nth-child(18), .item.item-animate.show-addtocart:nth-child(19), .item.item-animate.show-addtocart:nth-child(20),
.item.item-animate.show-addtocart:nth-child(21), .item.item-animate.show-addtocart:nth-child(22), .item.item-animate.show-addtocart:nth-child(23), .item.item-animate.show-addtocart:nth-child(24),
.item.item-animate.show-addtocart:nth-child(25), .item.item-animate.show-addtocart:nth-child(26), .item.item-animate.show-addtocart:nth-child(27), .item.item-animate.show-addtocart:nth-child(28),
.item.item-animate.show-addtocart:nth-child(29) {display:block;}
и в шаблоне
main.js заменить строки:
//Функция показать больше для Товаров на главной
$(function(){
var i = 0;
$('.pdt_best_sales .item.item-animate.show-addtocart').each(function(){
i++;
})
if(i<=8){$('.pdt_best_sales .showAllGoods').hide()}
на:
//Функция показать больше для Товаров на главной
$(function(){
var i = 0;
$('.pdt_best_sales .item.item-animate.show-addtocart').each(function(){
i++;
})
if(i<=30){$('.pdt_best_sales .showAllGoods').hide()}