{#
* 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 %}
<!-- ▼おすすめ商品▼ -->
<section class="p-section bg-gray recommend-product">
<div class="inner">
<h2 class="p-title icon-top"><span>おすすめ商品</span></h2>
<p class="p-text">人気商品、季節のおすすめ、限定商品などをご紹介しております。</p>
<ul class="p-product-list">
{% for RecommendProduct in recommend_products %}
<li class="p-product-item">
<a href="{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}">
<div class="product-item-head">
{% if RecommendProduct.Product.ProductBadge is defined and
RecommendProduct.Product.ProductBadge is not null and
RecommendProduct.Product.ProductBadge.name is defined and
RecommendProduct.Product.ProductBadge.name is not null and
RecommendProduct.Product.ProductBadge.filename != '' %}
<div class="product-item-badge">
<img
src="{{ asset(RecommendProduct.Product.ProductBadge.filename|no_image_product, 'save_image') }}"
alt="{{ RecommendProduct.Product.ProductBadge.name }}">
</div>
{% endif %}
<img src="{{ asset(RecommendProduct.Product.mainFileName|no_image_product, "save_image") }}" alt="">
</div>
<div class="product-item-body">
<h3 class="product-item-name">{{ RecommendProduct.Product.name }}</h3>
<p class="product-item-desc">{{ RecommendProduct.comment|raw|purify|nl2br }}</p>
<p class="product-item-price">
{% if RecommendProduct.Product.hasProductClass %}
{% if RecommendProduct.Product.getPrice02Min == RecommendProduct.Product.getPrice02Max %}
{{ RecommendProduct.Product.getPrice02IncTaxMin }}<span>円(税込)</span>
{% else %}
{{ RecommendProduct.Product.getPrice02IncTaxMin }}
~
{{ RecommendProduct.Product.getPrice02IncTaxMax }}<span>円(税込)</span>
{% endif %}
{% else %}
{{ RecommendProduct.Product.getPrice02IncTaxMin }}<span>円(税込)</span>
{% endif %}
</p>
</div>
</a>
</li>
{% endfor %}
</ul>
<div class="p-button green">
<a href="{{ url('product_list') }}">商品一覧</a>
</div>
</div>
</section>
<!-- ▲おすすめ商品▲ -->