app/template/idealinc/Block/recommend_product_block.twig line 1

Open in your IDE?
  1. {#
  2.  * This file is part of the Recommend Product plugin
  3.  *
  4.  * Copyright (C) 2016 LOCKON CO.,LTD. All Rights Reserved.
  5.  *
  6.  * For the full copyright and license information, please view the LICENSE
  7.  * file that was distributed with this source code.
  8. #}
  9. {% set productListUrl = url('product_list') %}
  10. {% if (shop is defined) %}
  11.     {% set productListUrl = url('product_list', {'shop': shop }) %}
  12. {% endif %}
  13. <!-- RECOMMEND -->
  14. <div class="bgColor">
  15.     <section class="recommend">
  16.         <div class="flex flexRecommend">
  17.             <div>
  18.                 <h2 class="h2Normal">RECOMMEND ITEMS</h2>
  19.             </div>
  20.             <div>
  21.                 <div class="flex pcShow">
  22.                     <div>
  23.                         <hr class="hr3">
  24.                     </div>
  25.                     <div>
  26.                         <a href="{{ productListUrl }}">
  27.                             <p class="txt6">MORE</p>
  28.                         </a>
  29.                     </div>
  30.                 </div>
  31.             </div>
  32.         </div>
  33.         <div class="flexWrap slider">
  34.             {% set i = 0 %}
  35.             {% for RecommendProduct in RecommendProducts if i < 3 %}
  36.                 {% set i = i + 1 %}
  37.                 <div class="flex">
  38.                     <div>
  39.                         <div class="recommended-img--wrapper">
  40.                             <img src="{{ asset(RecommendProduct.mainFileName|no_image_product, "save_image") }}" alt="">
  41.                         </div>
  42.                     </div>
  43.                     {% set brand = '' %}
  44.                     {% for ProductCategory in RecommendProduct.ProductCategories %}
  45.                         {% if ProductCategory.Category.Parent and ProductCategory.Category.Parent.id == '3' %}
  46.                             {% set brand = ProductCategory.Category.name %}
  47.                         {% endif %}
  48.                     {% endfor %}
  49.                     <div class="flexTxt">
  50.                         <p class="txt4">{{ brand }}</p>
  51.                         <p class="txt7">{{ RecommendProduct.name }}</p>
  52.                         <p class="txt8 bottom-add-cart-btn">Price: {{ RecommendProduct.getFormattedPriceForList() | raw }}</p>
  53.                         <a href="{{ url('product_detail', {'id': RecommendProduct.id}) }}" class="buttonC">DETAIL</a>
  54.                     </div>
  55.                 </div>
  56.             {% endfor %}
  57.         </div>
  58.     </section>
  59. </div>
  60. <div class="spShow lineWrap">
  61.     <div class="line"></div>
  62.     <div class="txt9">
  63.     <a href="{{ productListUrl }}">MORE</a>
  64.     </div>
  65. </div>
  66. <!-- ▼item_list▼ -->
  67. {# <div class="ec-shelfRole">
  68.     <ul class="ec-shelfGrid">
  69.         {% for RecommendProduct in recommend_products %}
  70.             <li class="ec-shelfGrid__item">
  71.                 <a href="{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}">
  72.                     <img src="{{ asset(RecommendProduct.Product.mainFileName|no_image_product, "save_image") }}">
  73.                     <p>{{ RecommendProduct.comment|raw|nl2br }}</p>
  74.                     <dl>
  75.                         <dt class="item_name">{{ RecommendProduct.Product.name }}</dt>
  76.                         <dd class="item_price">
  77.                             {% if RecommendProduct.Product.hasProductClass %}
  78.                                 {% if RecommendProduct.Product.getPrice02Min == RecommendProduct.Product.getPrice02Max %}
  79.                                     {{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
  80.                                 {% else %}
  81.                                     {{ RecommendProduct.Product.getPrice02IncTaxMin|price }} ~ {{ RecommendProduct.Product.getPrice02IncTaxMax|price }}
  82.                                 {% endif %}
  83.                             {% else %}
  84.                                 {{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
  85.                             {% endif %}
  86.                         </dd>
  87.                     </dl>
  88.                 </a>
  89.             </li>
  90.         {% endfor %}
  91.     </ul>
  92. </div> #}
  93. <!-- ▲item_list▲ -->