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

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