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

Open in your IDE?
  1. {#
  2.     【カテゴリに所属する商品を呼び出します】
  3.     ●category に呼び出したいカテゴリのIDを入れます。
  4.     例 )11番を呼びたい
  5.         これは例→{% set category = 11 %}
  6.     ●count に呼び出したい個数を入れます。
  7.     例)7個呼びたい
  8.         これは例→{% set count = 7 %}
  9.     ※ただし、鯖の負荷の都合で最大50件に絞ってます。
  10.     /*
  11.     メンテナンスメモ
  12.     countの使い方の説明は Block/new_item.twig にもある。変えるときはあっちも変える。
  13.     */
  14. #}
  15. {% set category = 11 %}
  16. {% set count = 3 %}
  17. {% set Products = CustomizeCatProduct(category, count) %}
  18. {% if Products|length > 0 %}
  19. <div class="ec-role">
  20.     <div class="ec-pickUpItemRole">
  21.         {# タイトルを変更してください。不要な場合は下記3行を削除 #}
  22.         <div class="ec-secHeading">
  23.             <span class="ec-secHeading__ja">{{ 'ピックアップ'|trans }}</span>
  24.         </div>
  25.         <div class="ec-pickUpItemRole__list">
  26.             {% for Product in Products %}
  27.             <div class="ec-pickUpItemRole__listItem">
  28.                 <a href="{{ url('product_detail', {'id': Product.id}) }}">
  29.                     <img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}">
  30.                     <p class="ec-pickUpItemRole__listItemTitle">{{ Product.name }}</p>
  31.                     <p class="ec-pickUpItemRole__listItemPrice">
  32.                     {% if Product.hasProductClass %}
  33.                         {% if Product.getPrice02Min == Product.getPrice02Max %}
  34.                             {{ Product.getPrice02IncTaxMin|price }}
  35.                         {% else %}
  36.                             {{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
  37.                         {% endif %}
  38.                     {% else %}
  39.                         {{ Product.getPrice02IncTaxMin|price }}
  40.                     {% endif %}
  41.                     </p>
  42.                 </a>
  43.             </div>
  44.             {% endfor %}
  45.         </div>
  46.         {#<div class="more_btn"><a href="{{ url('product_list', {'category_id': Category.id}) }}">VIEW MORE</a></div> #}
  47.     </div>
  48. </div>
  49. {% endif %}