{#
* This file is part of the Recommend Product plugin
*
* Copyright (C) EC-CUBE CO.,LTD. All Rights Reserved.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
#}
{% set recommend_products = repository('Plugin\\Recommend42\\Entity\\RecommendProduct').getRecommendProduct %}
<!-- ▼item_list▼ -->
{% if app.request.get('_route') != 'homepage' %}
{# トップページは見出しのスタイルが異なるのでトップページ以外で出力する #}
<section class="top-recommend">
<h2 class="mod-hl-01 marginTop50">おすすめ商品</h2>
<div class="mod-productsBoxContainer">
{% endif %}
{% for RecommendProduct in recommend_products %}
<!-- BOX -->
<article class="mod-productsBox">
<a href="{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}" class="mod-productsBoxInner">
<span class="boxImg">
<span class="boxImgInner">
<img src="{{ asset(RecommendProduct.Product.mainFileName|no_image_product, "save_image") }}" alt="" class="imgObjectFitCover" loading="lazy">
</span>
</span>
<div class="boxData">
<h3 class="name">{{ RecommendProduct.Product.name }}</h3>
<p class="price">
{% if RecommendProduct.Product.hasProductClass %}
{% if RecommendProduct.Product.getPrice02Min == RecommendProduct.Product.getPrice02Max %}
{{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
{% else %}
{{ RecommendProduct.Product.getPrice02IncTaxMin|price }} ~ {{ RecommendProduct.Product.getPrice02IncTaxMax|price }}
{% endif %}
{% else %}
{{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
{% endif %}
<span class="tax">(税込)</span></p>
</div>
</a>
</article>
<!-- /BOX -->
{% endfor %}
{% if app.request.get('_route') != 'homepage' %}
</div>
</section>
{% endif %}
<!-- ▲item_list▲ -->