{#This file is part of RefineCopyright(c) 2021 Refine Co.,Ltd. All Rights Reserved.https://www.re-fine.jp/For the full copyright and license information, please view the LICENSEfile that was distributed with this source code.#}{% if Products %}<section id="common_check_block"> <div class="home_title__inner"> <h2 class="home_ja_title">最近チェックした商品</h2> </div><!--/.home_title__inner--> <div class="common_check__inner"> <ul class="common_check_list"> {% for ProductArray in Products %} {% if loop.index <= 4 %} {% set product = ProductArray.Product %} {% set hasStock = ProductArray.hasStock %} <li class="check_list_block"> <a href="{{ url('product_detail', {'id': product.id}) }}"> <div class="thumb"> <img src="{{ asset(product.main_list_image|no_image_product, 'save_image') }}" alt="{{ product.name }}" {% if loop.index > 5 %} loading="lazy"{% endif %}> </div><!--/.thumb--> {# 商品が所属する特定の親カテゴリの子カテゴリを取得します #} {% set targetParentCategoryId = 34 %} {# 親カテゴリのIDを指定 #} {% set relatedSubcategories = [] %} {% for productCategory in product.ProductCategories %} {% set category = productCategory.Category %} {% if category.Parent and category.Parent.id == targetParentCategoryId %} {% set relatedSubcategories = relatedSubcategories|merge([category]) %} {% endif %} {% endfor %} <div class="pickup_list_block__txt"> {# 商品が所属する特定の親カテゴリの子カテゴリを表示します #} {% for subcategory in relatedSubcategories %} <object> <a class="brand_name" href="{{ url('product_list', {'category_id': subcategory.id}) }}"> {{ subcategory.name }} </a> </object> {% endfor %} <span class="product_ttl">{{ product.name }}</span> <span class="product_price"> <span class="product_price__num"> {% if product.hasProductClass %} {% if product.getPrice02Min == product.getPrice02Max %} {{ product.getPrice02IncTaxMin|price }} {% else %} {{ product.getPrice02IncTaxMin|price }} ~ {{ product.getPrice02IncTaxMax|price }} {% endif %} {% else %} {{ product.getPrice02IncTaxMin|price }} {% endif %} </span><!--/.product_price__num--> <span class="zeikomi">(税込)</span> </span> </div><!--/.pickup_list_block__txt--> </a> </li> {% endif %} {% endfor %} </ul> </div><!--/.home_pickup__inner--></section><!--/#home_check-->{% endif %}{# <div class="ec-shelfRole"> <h2 class="ec-headingTitle">{{ 'refine_check_item.check_item'|trans }}</h2> <ul class="ec-shelfGrid"> {% for ProductArray in Products %} {% set Product = ProductArray.Product %} {% set hasStock = ProductArray.hasStock %} <li class="ec-shelfGrid__item"> <a href="{{ url('product_detail', {'id': Product.id}) }}"> <img src="{{ asset(Product.main_list_image|no_image_product, "save_image") }}" alt="{{ Product.name }}"> <dl> <dt class="item_name">{{ Product.name }}</dt> <dd class="item_price"> {% if Product.hasProductClass %} {% if Product.getPrice02Min == Product.getPrice02Max %} {{ Product.getPrice02IncTaxMin|price }} {% else %} {{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }} {% endif %} {% else %} {{ Product.getPrice02IncTaxMin|price }} {% endif %} </dd> <dd> {% if hasStock %} {{ 'refine_check_item.has_stock'|trans }} {% else %} {{ 'refine_check_item.no_stock'|trans }} {% endif %} </dd> </dl> </a> </li> {% endfor %} </ul> </div>#}