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.     <ul class="ec-shelfGrid">
  13.         {% for RecommendProduct in recommend_products %}
  14.             <li class="ec-shelfGrid__item">
  15.                 <a href="{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}">
  16.                     <img src="{{ asset(RecommendProduct.Product.mainFileName|no_image_product, "save_image") }}">
  17.                     <p>{{ RecommendProduct.comment|raw|purify|nl2br }}</p>
  18.                     <dl>
  19.                         <dt class="item_name">{{ RecommendProduct.Product.name }}</dt>
  20.                         <dd class="item_price">
  21.                             {% if RecommendProduct.Product.hasProductClass %}
  22.                                 {% if RecommendProduct.Product.getPrice02Min == RecommendProduct.Product.getPrice02Max %}
  23.                                     {{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
  24.                                 {% else %}
  25.                                     {{ RecommendProduct.Product.getPrice02IncTaxMin|price }} ~ {{ RecommendProduct.Product.getPrice02IncTaxMax|price }}
  26.                                 {% endif %}
  27.                             {% else %}
  28.                                 {{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
  29.                             {% endif %}
  30.                         </dd>
  31.                     </dl>
  32.                 </a>
  33.             </li>
  34.         {% endfor %}
  35.     </ul>
  36. </div>
  37. <!-- ▲item_list▲ -->