Перейти к содержанию
Форум поддержки пользователей VamShop

Как в шаблоне vamshop5 на странице карточки товара сделать открытие картинок в popup окне, без zoom'a?


support

Рекомендуемые сообщения

В /templates/vamshop5/module/product_info/product_info_v1.html меняйте:

                  <div class="product-gallery-preview-item active" id="image0"><img itemprop="image" class="image-zoom" src="{$PRODUCTS_IMAGE}" {if $PRODUCTS_POPUP_LINK!=''}data-zoom="{$PRODUCTS_POPUP_IMAGE}"{/if} alt="{if $PRODUCTS_IMAGE_DESCRIPTION !=''}{$PRODUCTS_IMAGE_DESCRIPTION}{else}{$PRODUCTS_NAME}{/if}">
                    <div class="image-zoom-pane"></div>
                  </div>
    {foreach name=slide item=slides from=$mo_img}
                  <div class="product-gallery-preview-item" id="image{counter name=1}"><img itemprop="image" class="image-zoom" src="{$slides.PRODUCTS_MO_IMAGE}" {if $slides.PRODUCTS_MO_POPUP_LINK !=''}data-zoom="{$slides.PRODUCTS_MO_POPUP_IMAGE}"{/if} alt="{if $slides.PRODUCTS_MO_IMAGE_DESCRIPTION !=''}{$slides.PRODUCTS_MO_IMAGE_DESCRIPTION}{else}{$PRODUCTS_NAME}{/if}">
                    <div class="image-zoom-pane"></div>
                  </div>
    {/foreach}

на:

                  <div class="product-gallery-preview-item active" id="image0">{if $PRODUCTS_POPUP_LINK!=''}<a href="{$PRODUCTS_POPUP_IMAGE}" title="{$PRODUCTS_NAME}" class="lightbox image-zoom">{/if}<img itemprop="image" src="{$PRODUCTS_IMAGE}" alt="{if $PRODUCTS_IMAGE_DESCRIPTION !=''}{$PRODUCTS_IMAGE_DESCRIPTION}{else}{$PRODUCTS_NAME}{/if}">{if $PRODUCTS_POPUP_LINK!=''}</a>{/if}
                  </div>
    {foreach name=slide item=slides from=$mo_img}
                  <div class="product-gallery-preview-item" id="image{counter name=1}">{if $slides.PRODUCTS_MO_POPUP_LINK !=''}<a href="{$slides.PRODUCTS_MO_POPUP_IMAGE}" title="{$PRODUCTS_NAME}" class="lightbox image-zoom">{/if}<img itemprop="image" src="{$slides.PRODUCTS_MO_IMAGE}" alt="{if $slides.PRODUCTS_MO_IMAGE_DESCRIPTION !=''}{$slides.PRODUCTS_MO_IMAGE_DESCRIPTION}{else}{$PRODUCTS_NAME}{/if}">{if $slides.PRODUCTS_MO_POPUP_LINK !=''}</a>{/if}
                  </div>
    {/foreach}

В /templates/vamshop5/dist/js/theme.js удалите:

  /**
   * Image zoom on hover (used inside Product Gallery)
   * @requires https://github.com/imgix/drift
  */


  var imageZoom = function () {
    var images = document.querySelectorAll('.image-zoom');

    for (var i = 0; i < images.length; i++) {
      new Drift(images[i], {
        paneContainer: images[i].parentElement.querySelector('.image-zoom-pane')
      });
    }
  }();

 

В /templates/vamshop5/javascript/script_footer.php поменяйте theme.min.js на theme.js

 

и затем удалите все файлы из папки /templates/vamshop5/cache

Ссылка на сообщение
Поделиться на другие сайты
×
×
  • Создать...