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

Open in your IDE?
  1. {% set recommend_products = repository('Plugin\\Recommend42\\Entity\\RecommendProduct').getRecommendProduct %}
  2. <div class="ec-shelfRole">
  3.     <h2 class="h2rocket"><div class="h2bar01"></div><span class="h2span">宇宙スタッフが選ぶ</span><div class="h2bar02"></div><span class="common_br">おすすめ宇宙グッズ</span></h2>
  4.     <ul class="ec-shelfGrid">
  5.         {% for RecommendProduct in recommend_products %}
  6.             <li class="ec-shelfGrid__item">
  7.                 <a href="{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}">
  8.                     <div class="item_img"><img src="{{ asset(RecommendProduct.Product.mainFileName|no_image_product, "save_image") }}" alt="{{ RecommendProduct.Product.name }}"></div>
  9.                     {# <p>{{ RecommendProduct.comment|raw|purify|nl2br }}</p> #}
  10.                     <dl>
  11.                         <dt class="item_name">{{ RecommendProduct.Product.name }}</dt>
  12.                             {% if RecommendProduct.Product.hasProductClass %}
  13.                                 {% if RecommendProduct.Product.getPrice02Min == RecommendProduct.Product.getPrice02Max %}
  14.                                     <dd class="item_price">{{ RecommendProduct.Product.getPrice02IncTaxMin|price }}</dd>
  15.                                 {% else %}
  16.                                     <dd class="item_price price_multiple">{{ RecommendProduct.Product.getPrice02IncTaxMin|price }} ~ {{ RecommendProduct.Product.getPrice02IncTaxMax|price }}</dd>
  17.                                 {% endif %}
  18.                             {% else %}
  19.                                 <dd class="item_price">{{ RecommendProduct.Product.getPrice02IncTaxMin|price }}</dd>
  20.                             {% endif %}
  21.                     </dl>
  22.                 </a>
  23.             </li>
  24.         {% endfor %}
  25.     </ul>
  26. </div>