Перейти к содержимому


Добавление Блока Распродажа


  • Авторизуйтесь для ответа в теме
В этой теме нет ответов

#1 Никита Панин

Никита Панин

    Пользователь

  • Модератоpы
  • 19 сообщений

Отправлено 12 Ноябрь 2019 - 17:59

Перейдите в раздел Сайт - Редактор шаблонов - в шаблоне "HTML" найдите:

</div>
                  </div>
                <!--End Tab Content -->


перед указанным блоком кода добавьте:  
{% IFNOT index_page_sale_goods_empty %}
                      <div class="pdt-content {% IF index_page_goods_empty=1 && index_page_new_goods_empty=1 %}tab-content-actived is-loaded{% ELSE %}is-loading{% ENDIF %} pdt_sale">
                        <div class="pdt-list products-grid zoomOut play">
                          <div class="inner">
                            {% FOR index_page_sale_goods %}
                            <div class="item item-animate show-addtocart col-md-3 col-sm-4 col-sms-6 col-smb-12 {% IF index_page_sale_goods.index> 8 %}load-animate{% ENDIF %}" itemscope itemtype="https://schema.org/Product">
                              <div class="item-inner clearfix">
                                <div class="item-img have-additional clearfix">
                                  <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}" />
                                    {% IF index_page_sale_goods.IS_NEW %}
                                      <span class="ico-product new">Новинка</span>
                                    {% ELSEIF index_page_sale_goods.IS_TOP %}
                                      <span class="ico-product best">Хит</span>
                                    {% ENDIF %}
                                    {% IF index_page_sale_goods.MAX_DISCOUNT %}
                                      <span class="ico-product sale">Скидка</span>
                                    {% ENDIF %}
                                    <div class="cart-wrap">
                                      <div class="cart">
                                        <!--a class="add-cart quick btn-cart button btn-addto" title="Быстро оформить заказ" href="{CART_ADD_GOODS_MODIFICATION_URL | url_amp}?hash={HASH | url_amp}&amp;form%5Bgoods_from%5D={index_page_sale_goods.GOODS_FROM}&amp;form%5Bgoods_mod_id%5D={index_page_sale_goods.MIN_PRICE_NOW_ID}" {% IF SETTINGS_GOODS_DONT_PUT_TO_CART_MORE_THAN_AVAILABLE %}{% IF index_page_sale_goods.MAX_REST_VALUE=0 %}style="display:none;"{% ENDIF %}{% ENDIF %}></a-->
                                        <a class="add-cart btn-cart button btn-addto" title="В корзину" href="{CART_ADD_GOODS_MODIFICATION_URL | url_amp}?hash={HASH | url_amp}&amp;form%5Bgoods_from%5D={index_page_sale_goods.GOODS_FROM}&amp;form%5Bgoods_mod_id%5D={index_page_sale_goods.MIN_PRICE_NOW_ID}" {% IF SETTINGS_GOODS_DONT_PUT_TO_CART_MORE_THAN_AVAILABLE %}{% IF index_page_sale_goods.MAX_REST_VALUE=0 %}style="display:none;"{% ENDIF %}{% ENDIF %}>В корзину</a>
                                      </div>
                                    </div>
                                    <div class="item-img-info">
                                      <a href="{index_page_sale_goods.URL_MIN_PRICE_NOW | url_amp}" title="{index_page_sale_goods.NAME}" class="product-image">
                                        <img src="{% IF index_page_sale_goods.IMAGE_EMPTY %}{ASSETS_IMAGES_PATH}no-photo-small.png?design=azure{% ELSE %}{index_page_sale_goods.IMAGE_MEDIUM}{% ENDIF %}" class="goods-image-small" alt="{index_page_sale_goods.NAME}">
                                      </a>
                                      <div class="item-box-hover">
                                        <div class="box-inner {% IF TARIFF_FEATURE_GOODS_COMPARE && SETTINGS_COMPARE_DISABLE=1 %}compare-off{% ENDIF %}">
                                          <div class="actions">
                                            <ul class="add-to-links">
                                              <li>
                                                <!-- Если есть возможность добавить товар в избранное -->
                                                {% IF index_page_sale_goods.IS_HAS_IN_FAVORITES_LIST %}
                                                  <a class="add-wishlist added btn-addto"
                                                    data-action-is-add="0"
                                                    data-action-add-url="{FAVORITES_ADD_URL}"
                                                    data-action-delete-url="{FAVORITES_DELETE_URL}"
                                                    data-action-add-title="Добавить &laquo;{index_page_sale_goods.NAME}&raquo; в избранное"
                                                    data-action-delete-title="Убрать &laquo;{index_page_sale_goods.NAME}&raquo; из избранного"
                                                    title="Убрать &laquo;{index_page_sale_goods.NAME}&raquo; из избранного"
                                                    href="{FAVORITES_DELETE_URL}?id={index_page_sale_goods.MIN_PRICE_NOW_ID}&amp;return_to={CURRENT_URL | urlencode}"
                                                  ></a>
                                                {% ELSE %}
                                                  <a class="add-wishlist btn-addto"
                                                    data-action-is-add="1"
                                                    data-action-add-url="{FAVORITES_ADD_URL}"
                                                    data-action-delete-url="{FAVORITES_DELETE_URL}"
                                                    data-action-add-title="Добавить &laquo;{index_page_sale_goods.NAME}&raquo; в избранное"
                                                    data-action-delete-title="Убрать &laquo;{index_page_sale_goods.NAME}&raquo; из избранного"
                                                    title="Добавить &laquo;{index_page_sale_goods.NAME}&raquo; в избранное" href="{FAVORITES_ADD_URL}?id={index_page_sale_goods.MIN_PRICE_NOW_ID}&amp;return_to={CURRENT_URL | urlencode}"
                                                  ></a>
                                                {% ENDIF %}
                                                <!-- END Если есть возможность добавить товар в избранное -->
                                              </li>
                                              <li>
                                                <!-- Если в тарифном плане подключен модуль сравнения товаров и он не выключен в настройках магазина -->
                                                {% IF TARIFF_FEATURE_GOODS_COMPARE && SETTINGS_COMPARE_DISABLE=0 %}
                                                  {% IF index_page_sale_goods.IS_HAS_IN_COMPARE_LIST %}
                                                    <a class="add-compare added btn-addto"
                                                      data-action-is-add="0"
                                                      data-action-add-url="{COMPARE_ADD_URL}"
                                                      data-action-delete-url="{COMPARE_DELETE_URL}"
                                                      data-action-add-title="Добавить &laquo;{index_page_sale_goods.NAME}&raquo; в список сравнения с другими товарами"
                                                      data-action-delete-title="Убрать &laquo;{index_page_sale_goods.NAME}&raquo; из списка сравнения с другими товарами"
                                                      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="Убрать &laquo;{index_page_sale_goods.NAME}&raquo; из списка сравнения с другими товарами"
                                                      href="{COMPARE_DELETE_URL}?id={index_page_sale_goods.MIN_PRICE_NOW_ID}&amp;from={index_page_sale_goods.GOODS_FROM}&amp;return_to={CURRENT_URL | urlencode}"
                                                    ></a>
                                                  {% ELSE %}
                                                    <a class="add-compare btn-addto"
                                                      data-action-is-add="1"
                                                      data-action-add-url="{COMPARE_ADD_URL}"
                                                      data-action-delete-url="{COMPARE_DELETE_URL}"
                                                      data-action-add-title="Добавить &laquo;{index_page_sale_goods.NAME}&raquo; в список сравнения с другими товарами"
                                                      data-action-delete-title="Убрать &laquo;{index_page_sale_goods.NAME}&raquo; из списка сравнения с другими товарами"
                                                      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="Добавить &laquo;{index_page_sale_goods.NAME}&raquo; в список сравнения с другими товарами"
                                                      href="{COMPARE_ADD_URL}?id={index_page_sale_goods.MIN_PRICE_NOW_ID}&amp;from={index_page_sale_goods.GOODS_FROM}&amp;return_to={CURRENT_URL | urlencode}"
                                                    ></a>
                                                  {% ENDIF %}
                                                {% ENDIF %}
                                                <!-- END Если в тарифном плане подключен модуль сравнения товаров и он не выключен в настройках магазина -->
                                              </li>
                                            </ul>
                                          </div>
                                          <div class="quickview-wrap">
                                            <a class="sns-btn-quickview" href="{index_page_sale_goods.URL}" title="Быстрый просмотр &laquo;{index_page_sale_goods.NAME}&raquo;"><span>Быстрый просмотр</span></a>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </form>
                                </div>
                                <div class="item-info">
                                  <div class="info-inner">
                                    <div class="item-title">
                                      <a href="{index_page_sale_goods.URL_MIN_PRICE_NOW | url_amp}" title="{index_page_sale_goods.NAME}" itemprop="name">{index_page_sale_goods.NAME}</a>
                                      <meta itemprop="description" content="{% IF index_page_sale_goods.DESCRIPTION_SHORT %}{index_page_sale_goods.DESCRIPTION_SHORT}{% ELSE %}Описание отсутствует{% ENDIF %}">
                                    </div>
                                    <div class="item-content">
                                      <div class="item-price">
                                        <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 %}
                                          <p class="old-price">
                                            <span class="price {CURRENCY_CHAR_CODE}">{index_page_sale_goods.MIN_PRICE_NOW_WITHOUT_DISCOUNT | money_format}</span>
                                          </p>
                                          {% ELSEIF index_page_sale_goods.MIN_PRICE_OLD>index_page_sale_goods.MIN_PRICE_NOW %}
                                          <p class="old-price">
                                            <span class="price {CURRENCY_CHAR_CODE}">{index_page_sale_goods.MIN_PRICE_OLD | money_format}</span>
                                          </p>
                                          {% ENDIF %}
                                          <p 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>
                                          </p>
                                        </div>
                                      </div>
                                      <div class="rating">
                                        <div class="ratings">
                                          <div class="rating-box">
                                            {% IF index_page_sale_goods.OPINION_RATING_VALUE %}
                                            <span itemprop="aggregateRating" itemscope itemtype="https://schema.org/A...gregateRating">
                                              <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}"></div>
                                            </span>
                                            {% ELSE %}
                                              <div class="rating" style="width:0%" alt="Рейтинг не определён"></div>
                                            {% ENDIF %}
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                            {% ENDFOR %}
                            <div class="pdt-loadmore">
                              <div class="button btn-loadmore showAllGoods" title="Показать все"><span>Показать все</span></div>
                            </div>
                          </div>
                        </div>
                      </div>
                      {% 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-orderby="top_rating" data-href="pdt_top_rating"><span class="title">Хиты продаж</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-orderby="top_rating" data-href="pdt_sale"><span class="title">Распродажа</span></li>{% ENDIF %}




Количество пользователей, читающих эту тему: 0

0 пользователей, 0 гостей, 0 анонимных