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 fadeinu block_box">
  12.     <div class="ec-secHeading">
  13.         <span class="ec-secHeading__en">{{ 'RECOMMENDED'|trans }}</span><br>
  14.         <span class="ec-secHeading__ja">{{ 'おすすめ商品'|trans }}</span>
  15.     </div>
  16.     <ul class="ec-shelfGrid">
  17.         {% for RecommendProduct in recommend_products %}
  18.             <li class="ec-shelfGrid__item">
  19.                 <a href="{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}">
  20.                     <img src="{{ asset(RecommendProduct.Product.mainFileName|no_image_product, "save_image") }}">
  21. {#▼RZ 2023.04.28 DEL コメント非表示▼
  22.                     <p>{{ RecommendProduct.comment|raw|purify|nl2br }}</p>
  23. ▲RZ 2023.04.28 DEL コメント非表示▲#}
  24.                     <dl>
  25.                         <dt class="item_name">{{ RecommendProduct.Product.name }}</dt>
  26.                         <dd class="item_price">
  27.                             {% if RecommendProduct.Product.hasProductClass %}
  28.                                 {% if RecommendProduct.Product.getPrice02Min == RecommendProduct.Product.getPrice02Max %}
  29.                                     {{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
  30.                                 {% else %}
  31.                                     {{ RecommendProduct.Product.getPrice02IncTaxMin|price }} ~ {{ RecommendProduct.Product.getPrice02IncTaxMax|price }}
  32.                                 {% endif %}
  33.                             {% else %}
  34.                                 {{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
  35.                             {% endif %}
  36.                         </dd>
  37.                     </dl>
  38.                 </a>
  39.             </li>
  40.         {% endfor %}
  41.     </ul>
  42. </div>
  43. <!-- ▲item_list▲ -->