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

Open in your IDE?
  1. {#
  2. Copyright(c) 2024 SYSTEM FRIEND INC.
  3. #}
  4. {% set new_products = get_new_product_list() %}
  5. <!-- ▼new_item_list▼ -->
  6. {% if new_products is not empty %}
  7.     <div class="ec-role">
  8.         <div class="ec-newProductRole">
  9.             <div class="ec-secHeading">
  10.                 <span class="ec-secHeading__en">{{ 'new_product42.block_title_en'|trans }}</span>
  11.                 <span class="ec-secHeading__line"></span>
  12.                 <span class="ec-secHeading__ja">{{ 'new_product42.block_title_ja'|trans }}</span>
  13.             </div>
  14.             <div class="ec-newItemRole__list">
  15.                 <ul class="ec-shelfGrid">
  16.                     {% for Product in new_products %}
  17.                         <li class="ec-shelfGrid__item">
  18.                             <a href="{{ url('product_detail', {'id': Product.id}) }}">
  19.                                 <div class="list_item_image_area">
  20.                                     <img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}">
  21.                                 </div>
  22.                                 <p class="ec-newProductRole__listItemTitle">{{ Product.name }}</p>
  23.                             </a>
  24.                             <div class="product_item_inc_price">
  25.                                 {% if Product.hasProductClass %}
  26.                                     {% if Product.getPrice02Min == Product.getPrice02Max %}
  27.                                         {{ Product.getPrice02IncTaxMin|price }}
  28.                                     {% else %}
  29.                                         {{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
  30.                                     {% endif %}
  31.                                 {% else %}
  32.                                     {{ Product.getPrice02IncTaxMin|price }}
  33.                                 {% endif %}
  34.                             </div>
  35.                         </li>
  36.                     {% endfor %}
  37.                 </ul>
  38.             </div>
  39.             <div>
  40.                 <a style="margin-left: auto; margin-right: auto; margin-bottom: 30px;" class="ec-blockBtn--top" href="products/list?category_id=1">{{ 'もっと見る'|trans }}</a>
  41.             </div>
  42.         </div>
  43.     </div>
  44. {% endif %}
  45. <!-- ▲new_item_list▲ -->
  46. <style>
  47.     .ec-newProductRole{
  48.         padding: 60px 0 0;}
  49.     .ec-checkProductItemRole__list {
  50.         display: -ms-flexbox;
  51.         display: flex;
  52.         -ms-flex-wrap: wrap;
  53.         flex-wrap: wrap; }
  54.     .ec-newProductRole__listItem{
  55.         margin-bottom: 4%;
  56.         width: 48%;
  57.         height: auto; }
  58.     .ec-newProductRole__listItem:nth-child(odd) {
  59.         margin-right: 4%; }
  60.     .ec-newProductRole__listItemTitle {
  61.         margin: 20px 0 10px;
  62.         font-size: 14px;
  63.         font-weight: bold;
  64.     }
  65.     .ec-newProductRole{
  66.         padding: 60px 0;
  67.     }
  68.     .ec-checkProductItemRole__list{
  69.         -ms-flex-wrap: nowrap;
  70.         flex-wrap: nowrap;
  71.     }
  72.     .ec-newProductRole__listItem{
  73.         margin-bottom: 15px;
  74.         width: calc(100% / 4);
  75.     }
  76.     .ec-newProductRole__listItem:not(:last-of-type){
  77.         margin-right: 30px;
  78.     }
  79.     .ec-newProductRole__listItemTitle:nth-child(odd){
  80.         margin-right: 30px;
  81.     }
  82. </style>