{#
* 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.
#}
{% block javascript %}
<script>
$(function() {
$('.recommend_slider').slick({
slidesToShow: 4,
slidesToScroll: 1,
dots: false,
//arrows: false,
autoplay: true,
speed: 2000,
autoplaySpeed: 2000,
responsive: [{
breakpoint: 1067,
settings: {
slidesToShow: 3,
}
}, {
breakpoint: 767,//切り替えたいデバイス幅を入れる
settings: {
slidesToShow: 2,
}
}],
});
});
</script>
{% endblock javascript %}
{% set recommend_products = repository('Plugin\\Recommend42\\Entity\\RecommendProduct').getRecommendProduct %}
<div class="ec-shelfRole bg-white">
<div class="ec-newItemRole__listItem pt-5">
<div class="ec-secHeading my-4 text-center">
<p class="ec-secHeading__en fs-2">{{ 'RECOMMENDED'|trans }}</p>
<!--<p class="ec-secHeading__line"></p>-->
<p class="ec-secHeading__ja fs-6">{{ 'おすすめ商品'|trans }}</p>
</div>
</div>
<div class="ec-sliderRole overflow-hidden">
<div class="recommend_slider">
{% for RecommendProduct in recommend_products %}
<div class="item slick-slide px-2">
<a href="{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}">
<img src="{{ asset(RecommendProduct.Product.mainFileName|no_image_product, "save_image") }}">
</a>
</div>
{% endfor %}
</div>
</div>
<!--
<ul class="ec-shelfGrid">
{% for RecommendProduct in recommend_products %}
<li class="ec-shelfGrid__item">
<a href="{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}">
<img src="{{ asset(RecommendProduct.Product.mainFileName|no_image_product, "save_image") }}">
{#<p>{{ RecommendProduct.comment|raw|purify|nl2br }}</p>
<dl>
<dt class="item_name">{{ RecommendProduct.Product.name }}</dt>
<dd class="item_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 %}
</dd>
</dl>#}
</a>
</li>
{% endfor %}
</ul>-->
</div>
<!-- ▲item_list▲ -->