{% IF index_page_goods_empty=0 || index_page_new_goods_empty=0 || index_page_favorites_goods_empty=0 %}
<div id="producttabs">
<div class="container">
<div class="row">
<ul class="pdt-nav">
{% IFNOT index_page_goods_empty %}<li class="item-nav tab-nav-actived" data-href="pdt-sale"><span>Товары на главной</span></li>{% ENDIF %}
{% IFNOT index_page_new_goods_empty %}<li class="item-nav {% IF index_page_goods_empty=1 %}tab-nav-actived{% ENDIF %}" data-href="pdt-new"><span>Новинки</span></li>{% ENDIF %}
{% IFNOT index_page_favorites_goods_empty %}<li class="item-nav {% IF index_page_goods_empty=1 && index_page_new_goods_empty=1 %}tab-nav-actived{% ENDIF %}" data-href="pdt-best"><span>Хиты продаж</span></li>{% ENDIF %}
</ul>
Замените его на:
{% IF index_page_goods_empty=0 || index_page_new_goods_empty=0 || index_page_favorites_goods_empty=0 || index_page_sale_goods_empty=0 %}
<div id="producttabs">
<div class="container">
<div class="row">
<ul class="pdt-nav">
{% IFNOT index_page_goods_empty %}<li class="item-nav tab-nav-actived" data-href="pdt-sale"><span>Товары на главной</span></li>{% ENDIF %}
{% IFNOT index_page_new_goods_empty %}<li class="item-nav {% IF index_page_goods_empty=1 %}tab-nav-actived{% ENDIF %}" data-href="pdt-new"><span>Новинки</span></li>{% ENDIF %}
{% IFNOT index_page_favorites_goods_empty %}<li class="item-nav {% IF index_page_goods_empty=1 && index_page_new_goods_empty=1 %}tab-nav-actived{% ENDIF %}" data-href="pdt-best"><span>Хиты продаж</span></li>{% ENDIF %}
{% IFNOT index_page_sale_goods_empty %}<li class="item-nav {% IF index_page_goods_empty=1 && index_page_new_goods_empty=1 || index_page_favorites_goods_empty=1 %}tab-nav-actived{% ENDIF %}" data-href="pdt-sale1"><span>Распродажа</span></li>{% ENDIF %}
</ul>
Найдите данный код:
</div>
</div>
</div>
</div>
{% ENDIF %}
{% ENDIF %}
<!-- /END Товары на главной, Новинки, Хиты -->
И перед ним вставьте данный код:
{% IFNOT index_page_sale_goods_empty %}
<div class="pdt-content {% IF index_page_goods_empty=1 && index_page_new_goods_empty=1 || index_page_favorites_goods_empty=1 %}tab-content-actived{% ENDIF %} pdt-sale1">
<div class="pdt-list products-grid">
{% FOR index_page_sale_goods %}
<div class="item effect-pageLeft">
<div class="item-inner" itemscope itemtype="https://schema.org/Product">
<form action="{CART_ADD_GOODS_MODIFICATION_URL | url_amp}" method="post" class="product-form-{index_page_sale_goods.MIN_PRICE_NOW_ID} goodsListForm">
<input type="hidden" name="hash" value="{HASH}" />
<input type="hidden" name="form[goods_from]" value="{index_page_sale_goods.GOODS_FROM}" />
<input type="hidden" name="form[goods_mod_id]" value="{index_page_sale_goods.MIN_PRICE_NOW_ID}" />
<div class="product-hover">
<a href="{index_page_sale_goods.URL_MIN_PRICE_NOW | url_amp}" title="{index_page_sale_goods.NAME}" class="product-image">
<div class="ico-product">
{% IF index_page_sale_goods.IS_NEW %}
<span class="ico-new"><span>Новинка</span></span>
{% ELSEIF index_page_sale_goods.IS_TOP %}
<span class="ico-best"><span>Хит</span></span>
{% ENDIF %}
{% IF index_page_sale_goods.MAX_DISCOUNT %}
<span class="ico-sale"><span>Скидка</span></span>
{% ENDIF %}
</div>
<img src="{% IF index_page_sale_goods.IMAGE_EMPTY %}{ASSETS_IMAGES_PATH}no-photo-small.png?design=summer{% ELSE %}{index_page_sale_goods.IMAGE_MEDIUM}{% ENDIF %}" class="goods-image-small" alt="{index_page_sale_goods.NAME}" title="{index_page_sale_goods.NAME}" itemprop="image">
</a>
<div class="add-to-links">
<div class="wishlist">
<!-- Если есть возможность добавить товар в избранное -->
{% IF index_page_sale_goods.IS_HAS_IN_FAVORITES_LIST %}
<a class="add-wishlist added"
data-action-is-add="0"
data-action-add-url="{FAVORITES_ADD_URL}"
data-action-delete-url="{FAVORITES_DELETE_URL}"
data-action-add-title="Добавить «{index_page_sale_goods.NAME}» в избранное"
data-action-delete-title="Убрать «{index_page_sale_goods.NAME}» из избранного"
title="Убрать «{index_page_sale_goods.NAME}» из избранного"
href="{FAVORITES_DELETE_URL}?id={index_page_sale_goods.MIN_PRICE_NOW_ID}&return_to={CURRENT_URL | urlencode}"
><i class="fa fa-heart"></i></a>
{% ELSE %}
<a class="add-wishlist"
data-action-is-add="1"
data-action-add-url="{FAVORITES_ADD_URL}"
data-action-delete-url="{FAVORITES_DELETE_URL}"
data-action-add-title="Добавить «{index_page_sale_goods.NAME}» в избранное"
data-action-delete-title="Убрать «{index_page_sale_goods.NAME}» из избранного"
title="Добавить «{index_page_sale_goods.NAME}» в избранное" href="{FAVORITES_ADD_URL}?id={index_page_sale_goods.MIN_PRICE_NOW_ID}&return_to={CURRENT_URL | urlencode}"
><i class="fa fa-heart"></i></a>
{% ENDIF %}
<!-- END Если есть возможность добавить товар в избранное -->
</div>
<div class="compare">
<!-- Если в тарифном плане подключен модуль сравнения товаров и он не выключен в настройках магазина -->
{% IF TARIFF_FEATURE_GOODS_COMPARE && SETTINGS_COMPARE_DISABLE=0 %}
{% IF index_page_sale_goods.IS_HAS_IN_COMPARE_LIST %}
<a class="add-compare added"
data-action-is-add="0"
data-action-add-url="{COMPARE_ADD_URL}"
data-action-delete-url="{COMPARE_DELETE_URL}"
data-action-add-title="Добавить «{index_page_sale_goods.NAME}» в список сравнения с другими товарами"
data-action-delete-title="Убрать «{index_page_sale_goods.NAME}» из списка сравнения с другими товарами"
data-prodname="{index_page_sale_goods.NAME}"
data-produrl="{index_page_sale_goods.URL}"
data-id="{index_page_sale_goods.ID}"
data-mod-id="{index_page_sale_goods.MIN_PRICE_NOW_ID}"
title="Убрать «{index_page_sale_goods.NAME}» из списка сравнения с другими товарами"
href="{COMPARE_DELETE_URL}?id={index_page_sale_goods.MIN_PRICE_NOW_ID}&from={index_page_sale_goods.GOODS_FROM}&return_to={CURRENT_URL | urlencode}"
><i class="fa fa-retweet"></i></a>
{% ELSE %}
<a class="add-compare"
data-action-is-add="1"
data-action-add-url="{COMPARE_ADD_URL}"
data-action-delete-url="{COMPARE_DELETE_URL}"
data-action-add-title="Добавить «{index_page_sale_goods.NAME}» в список сравнения с другими товарами"
data-action-delete-title="Убрать «{index_page_sale_goods.NAME}» из списка сравнения с другими товарами"
data-prodname="{index_page_sale_goods.NAME}"
data-produrl="{index_page_sale_goods.URL}"
data-id="{index_page_sale_goods.ID}"
data-mod-id="{index_page_sale_goods.MIN_PRICE_NOW_ID}"
title="Добавить «{index_page_sale_goods.NAME}» в список сравнения с другими товарами"
href="{COMPARE_ADD_URL}?id={index_page_sale_goods.MIN_PRICE_NOW_ID}&from={index_page_sale_goods.GOODS_FROM}&return_to={CURRENT_URL | urlencode}"
><i class="fa fa-retweet"></i></a>
{% ENDIF %}
{% ENDIF %}
<!-- END Если в тарифном плане подключен модуль сравнения товаров и он не выключен в настройках магазина -->
</div>
</div>
</div>
<div class="item-info">
<h2 class="product-name"><a href="{index_page_sale_goods.URL_MIN_PRICE_NOW | url_amp}" title="{index_page_sale_goods.NAME}" itemprop="url">{index_page_sale_goods.NAME}</a></h2>
<meta itemprop="name" content="{index_page_sale_goods.NAME}">
<meta itemprop="description" content="{% IF index_page_sale_goods.DESCRIPTION_SHORT %}{index_page_sale_goods.DESCRIPTION_SHORT}{% ELSE %}Описание отсутствует{% ENDIF %}">
<div class="price-box" itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<meta itemprop="priceCurrency" content="{CURRENCY_CHAR_CODE}"/>
{% IF index_page_sale_goods.MIN_PRICE_NOW_WITHOUT_DISCOUNT>index_page_sale_goods.MIN_PRICE_NOW %}
<span class="old-price">
<span class="price {CURRENCY_CHAR_CODE}">{index_page_sale_goods.MIN_PRICE_NOW_WITHOUT_DISCOUNT | money_format}</span>
</span>
{% ELSEIF index_page_sale_goods.MIN_PRICE_OLD>index_page_sale_goods.MIN_PRICE_NOW %}
<span class="old-price">
<span class="price {CURRENCY_CHAR_CODE}">{index_page_sale_goods.MIN_PRICE_OLD | money_format}</span>
</span>
{% ENDIF %}
<span class="special-price">
<span class="price {CURRENCY_CHAR_CODE}" itemprop="price" content="{index_page_sale_goods.MIN_PRICE_NOW}">{index_page_sale_goods.MIN_PRICE_NOW | money_format}</span>
</span>
</div>
<div class="rating-hover">
<div class="ratings">
<div class="rating-box">
{% IF index_page_sale_goods.OPINION_RATING_VALUE %}
<span itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating">
<meta itemprop="worstRating" content = "1">
<meta itemprop="bestRating" content = "10">
<meta itemprop="ratingValue" content = "{index_page_sale_goods.OPINION_RATING_VALUE}">
<meta itemprop="reviewCount" content = "{index_page_sale_goods.OPINION_RATING_CNT_ALL}">
<div class="rating" style="width:{index_page_sale_goods.OPINION_RATING_VALUE}0%" alt="{index_page_sale_goods.OPINION_RATING_VALUE}" title="Рейтинг товара"></div>
</span>
{% ELSE %}
<div class="rating" style="width:0%" alt="Рейтинг не определён" title="Рейтинг не определён"></div>
{% ENDIF %}
</div>
</div>
</div>
</div>
<div class="actions">
{% IF SETTINGS_GOODS_DONT_PUT_TO_CART_MORE_THAN_AVAILABLE && index_page_sale_goods.MAX_REST_VALUE=0 %}
<span class="button">Нет в наличии</span>
{% ELSE %}
<!--a class="add-cart quick button" title="Быстро оформить заказ">В корзину</a-->
<a class="add-cart button" title="В корзину">В корзину</a>
{% ENDIF %}
</div>
</form>
</div>
</div>
{% ENDFOR %}
<div class="button-load">
<div class="loadGoods button" title="Показать все">Показать все</div>
</div>
</div>
</div>
{% ENDIF %}
Зайдите в Редактор шаблонов --- main.js и найдите данный код:
//Функция показать больше для Хитов продаж
$(function(){
var i = 0;
$('.pdt-best .item').each(function(){
i++;
})
if(i<=8){$('.pdt-best .button-load').hide()}
$('.pdt-best .loadGoods').on('click',function(){
if($(this).hasClass('loaded')){
$(this).removeClass('loaded');
$('.pdt-best .item').removeClass('showThis');
$(this).text('Показать все');
$(this).attr('title', 'Показать все');
}else{
$('.pdt-best .item').addClass('showThis');
$(this).addClass('loaded');
$(this).text('Скрыть');
$(this).attr('title', 'Скрыть');
}
})
});
}
Замените его на:
//Функция показать больше для Хитов продаж
$(function(){
var i = 0;
$('.pdt-best .item').each(function(){
i++;
})
if(i<=8){$('.pdt-best .button-load').hide()}
$('.pdt-best .loadGoods').on('click',function(){
if($(this).hasClass('loaded')){
$(this).removeClass('loaded');
$('.pdt-best .item').removeClass('showThis');
$(this).text('Показать все');
$(this).attr('title', 'Показать все');
}else{
$('.pdt-best .item').addClass('showThis');
$(this).addClass('loaded');
$(this).text('Скрыть');
$(this).attr('title', 'Скрыть');
}
})
});
//Функция показать больше для Распродажи
$(function(){
var i = 0;
$('.pdt-sale1 .item').each(function(){
i++;
})
if(i<=8){$('.pdt-sale1 .button-load').hide()}
$('.pdt-sale1 .loadGoods').on('click',function(){
if($(this).hasClass('loaded')){
$(this).removeClass('loaded');
$('.pdt-sale1 .item').removeClass('showThis');
$(this).text('Показать все');
$(this).attr('title', 'Показать все');
}else{
$('.pdt-sale1 .item').addClass('showThis');
$(this).addClass('loaded');
$(this).text('Скрыть');
$(this).attr('title', 'Скрыть');
}
})
});
}












