{% if product.imagesByType('main') is not empty %} {% set source_path = product.imagesByType('main').first.path %} {% set original_path = source_path|imagine_filter('sylius_shop_product_original') %} {% set zoom_path = source_path|imagine_filter('app_shop_product_show_zoom') %} {% set path = source_path|imagine_filter(filter|default('sylius_shop_product_large_thumbnail')) %} {% set alt = product.images.first.alt %} {% elseif product.images.first %} {% set source_path = product.images.first.path %} {% set original_path = source_path|imagine_filter('sylius_shop_product_original') %} {% set zoom_path = source_path|imagine_filter('app_shop_product_show_zoom') %} {% set path = source_path|imagine_filter(filter|default('sylius_shop_product_large_thumbnail')) %} {% set alt = product.images.first.alt %} {% else %} {% set original_path = asset('images/spacer.png') %} {% set zoom_path = original_path %} {% set path = original_path %} {% set alt = product.name %} {% endif %}{% if alt == "" or alt is null %} {% set alt = product.name %}{% endif %}{% set productIsInWishlist = false %}{% if wishlist is not defined or wishlist is null %} {% set wishlist = app_get_wishlist() %}{% endif %}{% if wishlist is defined and wishlist %} {% set productIsInWishlist = wishlist.hasProduct(product) %}{% endif %}<div class="mx-md-0 mx-n3"> <div data-product-image="{{ path }}" data-product-link="{{ original_path }}" class="big-img position-relative"> <div class="btn-slide2-prev artimg-prev d-none d-md-block"></div> <div class="btn-slide2-next artimg-next d-none d-md-block"></div> <div class="swiper-container gallery-art-image"> <div class="swiper-wrapper"> <div class="swiper-slide img-bit-article"> <a href="{{ zoom_path}}" class="position-relative overflow-hidden" id="bigLink" data-toggle="lightbox"> <img id="big" class="img-fluid w-100" src="{{ zoom_path}}" alt="{{ product.name }}" {{ sylius_test_html_attribute('main-image') }}/> </a> {% if product.callouts is not null and product.callouts|length > 0 %} {% include "@SetonoSyliusCalloutPlugin/Shop/Product/Callout/_callouts.html.twig" with {'callouts' : product.callouts|setono_callouts, "spot": "product_image"} %} {% endif %} </div> {% if product.images|length > 1 %} {% set myVal = 0 %} {% for image in product.images %} {% if image.alt is not null %} {% set alt = image.alt %} {% else %} {% set alt = product.name %} {% endif %} {% set myVal = myVal + 1 %} {% if myVal > 1 %} {% set path = image.path is not null ? image.path|imagine_filter('sylius_shop_product_small_thumbnail') : asset('images/spacer.png') %} <div class="img-bit-article swiper-slide" data-js-product-thumbnail> {% if product.isConfigurable() and product.variants|length > 0 %} {% include '@SyliusShop/Product/Show/_imageVariants.html.twig' %} {% endif %} <a href="{{ image.path|imagine_filter('sylius_shop_product_large_thumbnail') }}" class="" data-toggle="lightbox" data-gallery="test-{{myVal}}" > {% if app_file_exists((path ~ ".webp")|replace({"resolve/": ""})) %} <img class="w-100" src="{{ (path ~ ".webp")|replace({'resolve/':''}) }}" data-large-thumbnail="{{ image.path|imagine_filter('sylius_shop_product_large_thumbnail') }}" alt="{{ product.name }}" /> {% else %} <img class="w-100" src="{{ path }}" data-large-thumbnail="{{ image.path|imagine_filter('sylius_shop_product_large_thumbnail') }}" alt="{{ alt }}" /> {% endif %} </a> </div> {% endif %} {% endfor %} {% endif %} </div> <div class="position-relative pt-md-3 pt-2 d-flex_ d-md-none_ d-none align-items-center justify-content-center container-pagination"> <div class="swiper-pagination swiper-pagination-produit position-relative bottom-0 w-auto"></div> </div> </div> </div> <div class="thumbs-img-art d-none d-md-block"> <div class="swiper-container gallery-thumbs-art"> <div class="swiper-wrapper"> <div class="swiper-slide gallery-bit-article "> {% include '@SyliusShop/Product/Show/_video.html.twig' %} </div> {% if product.images|length > 0 %} {% set myVal2 = 0 %} {{ sylius_template_event('sylius.shop.product.show.before_thumbnails', {'product': product}) }} {% for image in product.images %} {% set myVal2 = myVal2 + 1 %} {% if myVal2 > 0 %} {% set path = image.path is not null ? image.path|imagine_filter('sylius_shop_product_small_thumbnail') : '//placehold.it/200x200' %} <div class="swiper-slide gallery-bit-article " data-js-product-thumbnail> {% if product.isConfigurable() and product.variants|length > 0 %} {% include '@SyliusShop/Product/Show/_imageVariants.html.twig' %} {% endif %} <a class="cursor-pointer" data-toggle="lightbox" href="{{ image.path|imagine_filter('app_shop_product_show_zoom') }}"> <img class="w-100" src="{{ path }}" data-large-thumbnail="{{ image.path|imagine_filter('app_shop_product_show_zoom') }}" alt="{{ product.name }}" /> </a> </div> {% endif %} {% endfor %} {% endif %} </div> </div> </div></div>