{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'product_page' %}
{% block stylesheet %}
{% endblock %}
{% block javascript %}
<script>
eccube.productsClassCategories = {
{% for Product in pagination %}
"{{ Product.id|escape('js') }}": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
{% endfor %}
};
</script>
{% endblock %}
{% block main %}
{% if search_form.category_id.vars.errors|length > 0 %}
<div class="ec-searchnavRole">
<p class="errormsg text-danger">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
</div>
{% else %}
<div class="c_inner">
<div class="list_header">
<h2 class="ttl"><small class="ft_e">Search results</small><i></i></h2>
</div>
<p class="list_reslut ft_e"><em>{{ '%count%'|trans({ '%count%': pagination.totalItemCount })|raw }}</em>products</p>
</div>
{% if pagination.totalItemCount > 0 %}
<div class="c_bg">
<ul class="item_list a">
{% for Product in pagination %}
{% if date('-30days') < Product.create_date %}<li class="new">{% else %}<li>{% endif %}
<a href="{{ url('product_detail', {'id': Product.id}) }}">
<img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" alt="{{ Product.name }}" {% if loop.index > 5 %} loading="lazy"{% endif %}>
<dl>
<dt>{{ Product.brand }}<br>
<dt>{{ Product.name }}</dt>
<dd class="price">
{% for prdClass in Product.ProductClasses %}
{% if prdClass.ClassCategory1 is not empty %}
{% if not ("併設スタジオ利用時のみ" in prdClass.ClassCategory1.name) %}
<p>{{ prdClass.ClassCategory1.name }}<i>{{ prdClass.price01|price }}</i></p>
{% endif %}
{% endif %}
{% endfor %}
</dd>
<dd>{{ Product.number }}</dd>
</dl>
</a>
<div class="favo">
<form action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post">
{% if Product.SearchWord is empty %}
<button type="submit" class="favorite" title="{{ 'お気に入りに追加'|trans }}"></button>
{% else %}
<button type="submit" class="favorite done" disabled="disabled" title="{{ 'お気に入りに追加済です。'|trans }}"></button>
{% endif %}
</form>
</div>
</li>
{% endfor %}
</ul>
</div>
<div class="ec-pagerRole">
{% include "pager.twig" with {'pages': pagination.paginationData} %}
</div>
{% endif %}
{% endif %}
{% endblock %}