{#
* 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 recommend_products %}
<section class="p-home-recommend">
<h2 class="p-home-recommend__ttl c-ttl-sec">
<span class="jp">おすすめ商品</span>
<span class="en">RECOMMEND</span>
</h2>
<div class="p-home-recommend__list" id="js-recommend-slider">
{% for RecommendProduct in recommend_products %}
{% if is_granted('view', RecommendProduct.Product) %}
<div class="p-home-recommend__item">
<a href="{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}" class="p-home-recommend__item-link l-link">
<div class="p-home-recommend__item-img-wrap">
<img src="{{ asset(RecommendProduct.Product.mainFileName|no_image_product, "save_image") }}" alt="">
</div>
<h3 class="p-home-recommend__item-ttl">{{ RecommendProduct.Product.name }}<span class="l-link__circle"><span class="l-link__arrow"></span></span></h3>
</a>
</div>
{% endif %}
{% endfor %}
</div>
<div class="p-home-recommend__btn-row">
<a href="{{ url('product_list') }}" class="p-home-recommend__btn c-btn">すべての商品をみる</a>
</div>
</section>
{% endif %}
<!-- ▲item_list▲ -->