app/Plugin/CategoryRecommend4/Resource/template/default/Product/list.twig line 1

Open in your IDE?
  1. {% if Category is not empty %}
  2.   {% set category_recommend_products = repository('Plugin\\CategoryRecommend4\\Entity\\CategoryRecommendProduct').getCategoryRecommendProduct(Category) %}
  3.   {% if category_recommend_products | length > 0 %}
  4.     <script>
  5.       $(function () {
  6.           $('.ec-layoutRole__contents').after($('#category_recommend_products'))
  7.       })
  8.     </script>
  9.     <!-- ▼item_list▼ -->
  10.     <div id="category_recommend_products" class="ec-shelfRole">
  11.       <div class="tw-wrapper">
  12.         <h3 class="tw-text-5xl tw-font-bold tw-mb-4">「{{ Category.name }}」のおすすめ商品</h3>
  13.         <ul class="ec-shelfGrid">
  14.           {% for CategoryRecommendProduct in category_recommend_products %}
  15.             {% set Product = CategoryRecommendProduct.Product %}
  16.             <li class="ec-shelfGrid__item">
  17.             <a href="{{ url('product_detail', {'id': Product.id}) }}" class='tw-item-list tw-rounded'>
  18.               <div class="tw-shadow-lg tw-flex tw-flex-col tw-justify-between tw-h-full tw-bg-white">
  19.                 <div class='tw-item-list-header tw-relative'>
  20.                   <p class='ec-shelfGrid__item-image'>
  21.                     <img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" alt="">
  22.                   </p>
  23.                 </div>
  24.                 <div class='tw-item-list-body'>
  25.                   <p>{{ Product.name }}</p>
  26.                   <p class='price02-default'>
  27.                     {% if Product.hasProductClass %}
  28.                       {% if Product.getPrice02Min == Product.getPrice02Max %}
  29.                         {{ Product.getPrice02IncTaxMin|price }}
  30.                       {% else %}
  31.                         {{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
  32.                       {% endif %}
  33.                     {% else %}
  34.                       {{ Product.getPrice02IncTaxMin|price }}
  35.                     {% endif %}
  36.                   </p>
  37.                 </div>
  38.               </div>
  39.             </a>
  40.             </li>
  41.           {% endfor %}
  42.         </ul>
  43.       </div>
  44.     </div>
  45.   {% endif %}
  46. {% endif %}