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 id="topitems">
  12. <div class="container pt-5 pb-5">
  13.     <div class="row mb-5">
  14.       <div class="col-12 text-center">
  15.         <div class="fw-bold mb-3 font18">あおいのお菓子</div>
  16.         あおい自慢のお菓子をご覧いただけます
  17.       </div>
  18.     </div>
  19.     <div class="row mb-5">
  20.       <div class="col-12 text-center">
  21. <div class="ec-shelfRole">
  22.     <ul class="ec-shelfGrid">
  23.         {% for RecommendProduct in recommend_products %}
  24.             <li class="ec-shelfGrid__item">
  25.                 <a href="{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}" class="recommend">
  26.                     <img src="{{ asset(RecommendProduct.Product.mainFileName|no_image_product, "save_image") }}">
  27.                     <p>{{ RecommendProduct.comment|raw|purify|nl2br }}</p>
  28.                     <dl>
  29.                         <dt class="item_name">{{ RecommendProduct.Product.name }}</dt>
  30.                         <dd class="item_price">
  31.                             {% if RecommendProduct.Product.hasProductClass %}
  32.                                 {% if RecommendProduct.Product.getPrice02Min == RecommendProduct.Product.getPrice02Max %}
  33.                                     {{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
  34.                                 {% else %}
  35.                                     {{ RecommendProduct.Product.getPrice02IncTaxMin|price }} ~ {{ RecommendProduct.Product.getPrice02IncTaxMax|price }}
  36.                                 {% endif %}
  37.                             {% else %}
  38.                                 {{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
  39.                             {% endif %}
  40.                         </dd>
  41.                     </dl>
  42.                 </a>
  43.             </li>
  44.         {% endfor %}
  45.     </ul>
  46. </div>
  47. <!-- ▲item_list▲ -->
  48.      </div>
  49.     </div>
  50.     <div class="row mb-5">
  51.       <div class="col-12 text-center">
  52.         <a class="btn-orange" href="{{url('product_list')}}">全てのお菓子を見る</a>
  53.       </div>
  54.     </div>
  55. </div>
  56. </div>