app/template/kaorime/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) EC-CUBE 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 recommend_products = repository('Plugin\\Recommend42\\Entity\\RecommendProduct').getRecommendProduct %}
  10. <!-- ▼item_list▼ -->
  11.         {% if app.request.get('_route') != 'homepage' %}
  12.             {# トップページは見出しのスタイルが異なるのでトップページ以外で出力する #}
  13.             <section class="top-recommend">
  14.             <h2 class="mod-hl-01 marginTop50">おすすめ商品</h2>
  15.             <div class="mod-productsBoxContainer">
  16.         {% endif %}
  17.         {% for RecommendProduct in recommend_products %}
  18.             <!-- BOX -->
  19.             <article class="mod-productsBox">
  20.                 <a href="{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}" class="mod-productsBoxInner">
  21.                     <span class="boxImg">
  22.                       <span class="boxImgInner">
  23.                         <img src="{{ asset(RecommendProduct.Product.mainFileName|no_image_product, "save_image") }}" alt="" class="imgObjectFitCover" loading="lazy">
  24.                       </span>
  25.                     </span>
  26.                     <div class="boxData">
  27.                         <h3 class="name">{{ RecommendProduct.Product.name }}</h3>
  28.                         <p class="price">
  29.                             {% if RecommendProduct.Product.hasProductClass %}
  30.                                 {% if RecommendProduct.Product.getPrice02Min == RecommendProduct.Product.getPrice02Max %}
  31.                                     {{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
  32.                                 {% else %}
  33.                                     {{ RecommendProduct.Product.getPrice02IncTaxMin|price }} ~ {{ RecommendProduct.Product.getPrice02IncTaxMax|price }}
  34.                                 {% endif %}
  35.                             {% else %}
  36.                                 {{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
  37.                             {% endif %}
  38.                             <span class="tax">(税込)</span></p>
  39.                     </div>
  40.                 </a>
  41.             </article>
  42.             <!-- /BOX -->
  43.         {% endfor %}
  44.         {% if app.request.get('_route') != 'homepage' %}
  45.             </div>
  46.             </section>
  47.         {% endif %}
  48. <!-- ▲item_list▲ -->