templates/mens/product/product_page.twig line 1

  1. {% extends 'mens/base/base_mens.twig' %}
  2. {% block head %}
  3.     {# {{ encore_entry_link_tags('app_product') }} #}
  4.     {% include 'mens/product/styles.html.twig' %}
  5.     <style>
  6.     .image-swatch li img {
  7.         width: 60px;
  8.         height: 60px;
  9.         cursor: pointer;
  10.     }
  11.     .breadcrumb-item+.breadcrumb-item::before {
  12.         float: left;
  13.         padding-right: .5rem;
  14.         color: #6c757d;
  15.         content: "›";
  16.     }
  17.     .product-right .price-detail span {
  18.         font-size: 22px;
  19.         padding-left: 0px;
  20.     }
  21.     .product-shipping-info{
  22.         display: grid;
  23.         grid-gap: 30px;
  24.     }
  25.     .product-right .product-count {
  26.         padding: 15px 15px;
  27.         border: 1px solid #eee;
  28.         background-color: #ffff;
  29.     }
  30.     .p-btn-circle {
  31.         border-radius: 100px;
  32.     }
  33.     </style>
  34.     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
  35.     <link rel="stylesheet" type="text/css" href="{{ asset('assets/slick/slick.css') }}">
  36.     <link rel="stylesheet" type="text/css" href="{{ asset('assets/slick/slick-theme.css') }}">
  37. {% endblock %}
  38. {% block breadcrumb %}
  39.     <div class="breadcrumb-section">
  40.         <div class="container">
  41.             <div class="row">
  42.                 <div class="col-sm-12">
  43.                     <nav aria-label="breadcrumb" class="theme-breadcrumb">
  44.                         <ol class="breadcrumb justify-content-lg-start">
  45.                             <li class="breadcrumb-item d-mobile-none"><a href="/">{{ 'Home' | trans({},'templates') }}</a></li>
  46.                             <li class="breadcrumb-item d-mobile-none"><a href="/">{{ product.name }}</a></li>
  47.                             <li class="breadcrumb-item active" aria-current="page">{{ variant.name }}</li>
  48.                         </ol>
  49.                     </nav>
  50.                 </div>
  51.             </div>
  52.         </div>
  53.     </div>
  54. {% endblock %}
  55. {% block main %}
  56.     {#  ****************** List Variables ******************  #}
  57.     <script>
  58.         let maxProductInStock //Add maximum product in stock
  59.     </script>
  60.     {#  ****************** List Variables ******************  #}
  61.         <!-- section start -->
  62.         <section>
  63.             <div class="collection-wrapper">
  64.                 <div class="container">
  65.                     <div class="row">
  66.                         <div class="col-lg-1 col-sm-2 col-xs-12">
  67.                             <div class="row">
  68.                                 <div class="col-12 p-0">
  69.                                     <div class="slider-right-nav">
  70.                                         {% if variant.images is defined %}
  71.                                             {% for image in variant.images %}
  72.                                                 <div>
  73.                                                     <img src="{{image}}" alt="{{ variant.name }}"
  74.                                                          class="img-fluid blur-up lazyload">
  75.                                                 </div>
  76.                                             {% endfor %}
  77.                                         {% endif %}
  78.                                     </div>
  79.                                 </div>
  80.                             </div>
  81.                         </div>
  82.                         <div class="col-lg-5 col-sm-10 col-xs-12 order-up">
  83.                             <div class="product-right-slick">
  84.                                 {% if variant.images is defined %}
  85.                                             {% for image in variant.images %}
  86.                                                 <div>
  87.                                                     <img src="{{image}}" alt="{{ variant.name }}"
  88.                                                          class="img-fluid blur-up lazyload image_zoom_cls-{{ loop.index }}">
  89.                                                 </div>
  90.                                             {% endfor %}
  91.                                 {% endif %}
  92.                             </div>
  93.                         </div>
  94.                         <div class="col-lg-6 rtl-text">
  95.                             <div class="product-right">
  96.                                 {# Product title #}
  97.                                 <h2 class="product-name">{{ variant.name }}</h2>
  98.                                 <h3 class="price-detail text-stroke"><span class="product-price">{{ variant.getRetailPrice()}} EUR</span></h3>
  99.                                 <span class="text-uppercase">{{ 'Color' | trans({},'templates') }} : <strong id="colorSwatch">Red</strong></span>
  100.                                 <ul class="image-swatch mt-2">
  101.                                     {% for option in options %}
  102.                                         {% set foo = 'bar' %}
  103.                                         {# {% if option.productVariant.id == variant.id %} #}
  104.                                             <li 
  105.                                                 data-color="{{option.value}}"
  106.                                                 onmouseover="product.swatchColor('{{option.value}}')"
  107.                                                 {# onmouseenter="product.swatchImage('/uploads/tbint/{{ option.productVariant.apiId}}/{{ option.productVariant.mainImage}}')"  #}
  108.                                                 {% if option.productVariant.id == variant.id %}class="active"{%endif%}
  109.                                             >
  110.                                             <a href="{{ path('app_product_page',{'pid': product.id,'vid': option.productVariant.id,'gender': "mens"}) }}"><img src="{{ option.productVariant.mainImage}}" alt="" class="img-fluid blur-up lazyload"></a>
  111.                                             </li>
  112.                                         {# {% endif %} #}
  113.                                     {% endfor %}
  114.                                 </ul>
  115.                                 <div id="selectSize" class="addeffect-section product-description border-product">
  116.                                     <h6 class="product-title size-text">{{ 'select size' | trans({},'templates') }} </h6>
  117.                                     <div class="modal fade" id="sizemodal" tabindex="-1" role="dialog"
  118.                                          aria-labelledby="exampleModalLabel" aria-hidden="true">
  119.                                         <div class="modal-dialog modal-dialog-centered" role="document">
  120.                                             <div class="modal-content">
  121.                                                 <div class="modal-header">
  122.                                                     <h5 class="modal-title" id="exampleModalLabel">Sheer
  123.                                                         Straight Kurta</h5>
  124.                                                     <button type="button" class="btn-close" data-bs-dismiss="modal"
  125.                                                             aria-label="Close"><span aria-hidden="true">&times;</span></button>
  126.                                                 </div>
  127.                                                 <div class="modal-body"><img src="{{ asset('assets/images/size-chart.jpg')}}" alt=""
  128.                                                                              class="img-fluid blur-up lazyload"></div>
  129.                                             </div>
  130.                                         </div>
  131.                                     </div>
  132.                                     <h6 class="size-select error-message">{{ 'please select size' | trans({},'templates') }}</h6>
  133.                                         <div class="size-box">
  134.                                             <ul>
  135.                                                 {% for size in sizeOptions %}
  136.                                                         <li onclick="product.selectCurrent('{{size.productVariant.id}}',this)">
  137.                                                             <div id="v-info" data-id="{{size.productVariant.id}}" data-name="{{size.productVariant.name}}" data-price="{{size.productVariant.price}}" data-image="{{size.productVariant.mainImage}}">
  138.                                                              </div>
  139.                                                         <a href="javascript:void(0)">{{ size.value }}</a>
  140.                                                         </li>
  141.                                                 {% endfor %}
  142.                                             </ul>
  143.                                         </div>
  144.                                 </div>
  145.                                 <div class="product-buttons">
  146.                                     {% if variant.quantity == 0 %}
  147.                                         <div  id="cartEffect" class="btn p-btn-circle hover-solid btn-animation product">
  148.                                             <h6 class="product-title text-danger">{{ 'SOLD OUT' | trans({},'templates') }}</h6>
  149.                                         </div>
  150.                                     {% else %}
  151.                                         <div onclick="product.addToCart()" id="cartEffect" class="btn p-btn-circle btn-solid hover-solid btn-animation product">
  152.                                             <i class="fa fa-shopping-cart me-1" aria-hidden="true"></i> {{ 'add to cart' | trans({},'templates') }}
  153.                                         </div>
  154.                                     {% endif %}
  155.                                     <a href="#" data-p-id="{{ variant.product.id }}" onclick="addToFavoris(this,'fa-2xl')" class="btn btn-solid p-btn-circle">
  156.                                     
  157.                                         {% if variant.product.id in app.session.get('wishlist') %}
  158.                                             <i class='fa-solid fa-heart fa-2xl' style='color: #ff0000;'></i>
  159.                                         {% else %}
  160.                                             <i class='fa-regular fa-heart fa-2xl'></i>
  161.                                         {% endif %}
  162.                                     
  163.                                     </a>
  164.                                 </div>
  165.                                 <div class="product-count">
  166.                                     <ul class="product-shipping-info">
  167.                                         <li>
  168.                                             <i class="fa-solid fa-truck fa-2xl me-1"></i>
  169.                                             <span class="lang">{{ 'Free shipping on qualifying orders' | trans({},'templates') }}</span>
  170.                                         </li>
  171.                                         <li>
  172.                                             {# <img src="/assets/images/icon/truck.png" class="img-fluid" alt="image"> #}
  173.                                             <i class="fa-solid fa-box fa-2xl me-1"></i>
  174.                                             <span class="lang">{{ 'Free Returns' | trans({},'templates') }} </span>
  175.                                         </li>
  176.                                     </ul>
  177.                                 </div>
  178.                                 {# <div class="border-product">
  179.                                     <h6 class="product-title">Sales Ends In</h6>
  180.                                     <div class="timer">
  181.                                         <p id="demo"></p>
  182.                                     </div>
  183.                                 </div> #}
  184.                                 <div class="border-product">
  185.                                     <div class="row product-accordion">
  186.                                         <div class="col-sm-12">
  187.                                             <div class="accordion theme-accordion" id="accordionExample">
  188.                                                 {% if variant.description %}
  189.                                                 <div class="card">
  190.                                                     <div class="card-header" id="headingOne">
  191.                                                         <h5 class="mb-0"><button class="btn btn-link" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">{{ 'product description' | trans({},'templates') }}</button></h5>
  192.                                                     </div>
  193.                                                     <div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-bs-parent="#accordionExample" style="">
  194.                                                         <div class="card-body">
  195.                                                             <p><p>{{ variant.description|raw }}</p></p>
  196.                                                         </div>
  197.                                                     </div>
  198.                                                 </div>
  199.                                                 {% endif %}
  200.                                                 {% if variant.composition %}
  201.                                                 <div class="card">
  202.                                                     <div class="card-header" id="headingThree">
  203.                                                         <h5 class="mb-0"><button class="btn btn-link collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">{{ 'Material' | trans({},'templates')}}</button></h5>
  204.                                                     </div>
  205.                                                     <div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-bs-parent="#accordionExample" style="">
  206.                                                         <div class="card-body">
  207.                                                             <p>{{ variant.composition | raw }}</p>
  208.                                                         </div>
  209.                                                     </div>
  210.                                                 </div>
  211.                                                 {% endif %}
  212.                                                 <div class="card">
  213.                                                     <div class="card-header" id="headingThree">
  214.                                                         <h5 class="mb-0"><button class="btn btn-link collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">{{ 'Size & Fit' | trans({},'templates') }}</button></h5>
  215.                                                     </div>
  216.                                                     <div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-bs-parent="#accordionExample" style="">
  217.                                                         <div class="card-body">
  218.                                                             <h6 class="product-title size-text"><span><a href="" data-bs-toggle="modal"
  219.                                                                                              data-bs-target="#sizemodal">{{ 'sizechart' | trans({},'templates') }}</a></span></h6>
  220.                                                         </div>
  221.                                                     </div>
  222.                                                 </div>
  223.                                                  <div class="card">
  224.                                                     <div class="card-header" id="headingThree">
  225.                                                         <h5 class="mb-0"><button class="btn btn-link collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">{{ 'Care Guide' | trans({},'templates') }}</button></h5>
  226.                                                     </div>
  227.                                                     <div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-bs-parent="#accordionExample" style="">
  228.                                                         <div class="card-body">
  229.                                                             <p>{{ 'Material' | trans({},'templates')}}</p>
  230.                                                         </div>
  231.                                                     </div>
  232.                                                 </div>
  233.                                             </div>
  234.                                         </div>
  235.                                     </div>
  236.                                 </div>
  237.                                 <div class="border-product">
  238.                                     <h6 class="product-title">{{ 'share it' | trans({},'templates') }}</h6>
  239.                                     <div class="product-icon">
  240.                                         <ul class="product-social">
  241.                                             <li><a href="#"><i class="fab fa-facebook-f"></i></a></li>
  242.                                             <li><a href="#"><i class="fab fa-google-plus-g"></i></a></li>
  243.                                             <li><a href="#"><i class="fab fa-twitter"></i></a></li>
  244.                                             <li><a href="#"><i class="fab fa-instagram"></i></a></li>
  245.                                             <li><a href="#"><i class="fa fa-rss"></i></a></li>
  246.                                         </ul>
  247.                                     </div>
  248.                                 </div>
  249.                             </div>
  250.                         </div>
  251.                     </div>
  252.                 </div>
  253.             </div>
  254.         </section>
  255.         <!-- Section ends -->
  256.         <div id="info" data-local={{ app.request.locale }} data-apiId={{ variant.apiId }} data-id="{{variant.id}}" data-name="{{variant.name}}" data-price="{{variant.price}}" data-image="{{variant.mainImage}}">
  257.         </div>
  258.         <!-- product section start -->
  259.         {% if relatedProducts %}
  260.         <section class="section-b-space ratio_asos">
  261.             <div class="container">
  262.                 <div class="row">
  263.                     <div class="col-12 product-related">
  264.                         <h2>{{ 'You might also like' | trans({},'templates') }}</h2>
  265.                     </div>
  266.                 </div>
  267.                 <div class="row autoplay search-product">
  268.                 {% for relatedProduct in relatedProducts %}
  269.                         
  270.                     <div class="col-xl-3 col-md-4 col-6">
  271.                         <div class="product-box p-1">
  272.                             <div class="img-wrapper">
  273.                                 <div class="front">
  274.                                     <a href="{{ path("app_product_page",{pid: relatedProduct.id, vid:relatedProduct.firstVariantId(),'gender': "mens"}) }}"><img src="{{ relatedProduct.mainImage }}"
  275.                                                      class="img-fluid blur-up lazyload bg-img" alt=""></a>
  276.                                 </div>
  277.                                 <div class="back">
  278.                                     <a href="{{ path("app_product_page",{pid: relatedProduct.id, vid:relatedProduct.firstVariantId,'gender': "mens"}) }}"><img src="{{ relatedProduct.getSecondImage()}}"
  279.                                                      class="img-fluid blur-up lazyload bg-img" alt=""></a>
  280.                                 </div>
  281.                                 <div class="cart-info cart-wrap">
  282.                                     <button onclick="product.addRelatedToCart(this)"
  283.                                             data-id="{{relatedProduct.firstVariantId()}}"
  284.                                             data-price="{{relatedProduct.firstVariantPrice()}}"
  285.                                             data-name="{{relatedProduct.name}}"
  286.                                             data-image="{{relatedProduct.mainImage}}"
  287.                                             {# data-bs-toggle="modal" data-bs-target="#addtocart" #}
  288.                                             title="Add to cart"
  289.                                     >
  290.                                     </button>
  291.                                      <a href="javascript:void(0)" data-p-id="{{ relatedProduct.id }}" onclick="addToFavoris(this)" title="{{ 'Add to Wishlist' | trans({},'templates') }}"><i class="ti-heart" aria-hidden="true"></i></a>
  292.                                 </div>
  293.                             </div>
  294.                             <div class="product-detail">
  295.                                 {# <div class="rating"><i class="fa fa-star"></i> <i class="fa fa-star"></i> <i
  296.                                             class="fa fa-star"></i> <i class="fa fa-star"></i> <i class="fa fa-star"></i>
  297.                                 </div> #}
  298.                                 <a href="{{ path("app_product_page",{pid: relatedProduct.id, vid:relatedProduct.firstVariantId(),'gender': "mens"}) }}">
  299.                                     <h6>{{ relatedProduct.name }}</h6>
  300.                                 </a>
  301.                                 <h4>{{ relatedProduct.firstVariantPrice() }} EUR</h4>
  302.                                 {# <ul class="color-variant">
  303.                                     <li class="bg-light0"></li>
  304.                                     <li class="bg-light1"></li>
  305.                                     <li class="bg-light2"></li>
  306.                                 </ul> #}
  307.                             </div>
  308.                         </div>
  309.                     </div>
  310.                 {% endfor %}
  311.                     </div>
  312.                 </div>
  313.             </div>
  314.         </section>
  315.         {% endif %}
  316.         <!-- product section end -->
  317.         <!-- tap to top start -->
  318.         <div class="tap-top">
  319.             <div><i class="fa fa-angle-double-up"></i></div>
  320.         </div>
  321.         <!-- tap to top end -->
  322. {% endblock %}
  323.  {% block newsletter %}
  324.                 {% include 'front_end/base/newsletter.twig' %}
  325. {% endblock %}
  326. {% block js %}
  327.         <script src="{{ asset('assets/js/product.js') }}"></script>
  328.         {% include 'mens/product/scripts.html.twig' %}
  329.         <script type="text/javascript" src="{{ asset('assets/slick/slick.min.js') }}"></script>
  330.         <script type="text/javascript">
  331.                 $('.autoplay').slick({
  332.                         slidesToShow: 4,
  333.                         slidesToScroll: 1,
  334.                         autoplay: true,
  335.                         autoplaySpeed: 2000,
  336.                 });
  337.         </script>
  338.         <script src="{{ asset('assets/js/modules.js') }}"></script>
  339. {% endblock %}