app/template/default/Block/recommended.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% set recommend_products = repository('Plugin\\Recommend42\\Entity\\RecommendProduct').getRecommendProduct %}
  9. <div class="ec-role">
  10.     <div class="ec-recommendedItemRole">
  11.         <div class="ec-recommendedItemRole__listTitle">
  12.             <div class="ec-recommendedItemRole__listItemHeading ec-secHeading--tandem">
  13.                 <span class="ec-secHeading__en">{{ 'Recommended'|trans }}</span>
  14.                 <span class="ec-secHeading__ja">{{ 'おすすめの商品'|trans }}</span>
  15.             </div>
  16.             <a class="ec-recommendedBtn--more show-resultPC" href="{{ url('recommended_list') }}">{{ 'おすすめ商品一覧を見る'|trans }}</a>
  17.         </div>
  18.         <div class="ec-recommendedItemRole__list">
  19.             {% for key, RecommendProduct in recommend_products %}
  20.                 {% if key < 8 %}
  21.                     <div class="ec-recommendedItemRole__listItem">
  22.                         <a href="{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}">
  23.                             <div><img src="{{ asset(RecommendProduct.Product.mainFileName|no_image_product, "save_image") }}"></div>
  24.                             <span class="ec-recommendedItemRole__listItemContent">
  25.                                 <p class="ec-recommendedItemRole__listItemTitle">{{ RecommendProduct.Product.name }}</p>
  26.                                 <p class="ec-recommendedItemRole__listItemPrice">
  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 %}{{ '(税込)'|trans }}
  36.                                 </p>
  37.                             </span>
  38.                         </a>
  39.                     </div>
  40.                 {% endif %}
  41.             {% endfor %}
  42.         </div>
  43.         <div class="ec-recommendedItemRole__listTitle">
  44.             <a class="ec-recommendedBtn--more show-resultSP" href="{{ url('recommended_list') }}">{{ 'おすすめ商品一覧を見る'|trans }}</a>
  45.         </div>
  46.     </div>
  47. </div>