app/template/default/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. <div class="ec-shelfRole">
  12.     <div class="ec-newProductRole" style="padding-top:20px; padding-bottom:20px;">
  13.         <div class="ec-secHeading">
  14.             <span class="ec-secHeading__en">RECOMMEND ITEM</span>
  15.             <span class="ec-secHeading__line"></span>
  16.             <span class="ec-secHeading__ja">おすすめ商品</span>
  17.         </div>
  18.         <div class="ec-newItemRole__list">
  19.             <ul class="ec-shelfGrid">
  20.                 {% for RecommendProduct in recommend_products %}
  21.                     <li class="ec-shelfGrid__item">
  22.                         <a href="{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}">
  23.                             <img src="{{ asset(RecommendProduct.Product.mainFileName|no_image_product, "save_image") }}">
  24.                             <p class="ec-newProductRole__listItemTitle">{{ RecommendProduct.comment|raw|purify|nl2br }}</p>
  25.                             <dl>
  26.                                 <dt class="item_name">{{ RecommendProduct.Product.name }}</dt>
  27.                                 <dd class="item_price">
  28.                                     {% if RecommendProduct.Product.hasProductClass %}
  29.                                         {% if RecommendProduct.Product.getPrice02Min == RecommendProduct.Product.getPrice02Max %}
  30.                                             {{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
  31.                                         {% else %}
  32.                                             {{ RecommendProduct.Product.getPrice02IncTaxMin|price }} ~ {{ RecommendProduct.Product.getPrice02IncTaxMax|price }}
  33.                                         {% endif %}
  34.                                     {% else %}
  35.                                         {{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
  36.                                     {% endif %}
  37.                                 </dd>
  38.                             </dl>
  39.                         </a>
  40.                     </li>
  41.                 {% endfor %}
  42.             </ul>
  43.         </div>
  44.         <div>
  45.             <a style="margin-left: auto; margin-right: auto; margin-bottom: 30px;" class="ec-blockBtn--top" href="products/list?category_id=7">{{ 'もっと見る'|trans }}</a>
  46.         </div>
  47.     </div>
  48. </div>
  49. <!-- ▲item_list▲ -->