{#
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-archive-page' %}
{% set title = '商品一覧' %}
{% block main %}
<section class="product">
<div class="container product__container">
<div class="product__head inview-custom">
<h1 class="product__title">PRODUCT</h1>
</div>
<div class="product__body inview">
<div class="product__sort product-sort">
</div>
{% if pagination.totalItemCount > 0 %}
<ul class="product__list">
{% for Product in pagination %}
<li class="product__item">
<div class="product__item-thumb">
<img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" alt="{{ Product.name }}" {% if loop.index > 5 %} loading="lazy"{% endif %}>
</div>
<div class="product__item-body">
<h2 class="product__item-title">{{ Product.name }}</h2>
<p class="product__item-price">
{% if Product.subscription_discount_rate is defined and Product.subscription_discount_rate > 0 %}
{% set discount_rate = Product.subscription_discount_rate %}
{% set original_price = Product.getPrice02IncTaxMin %}
{% set discounted_price = (original_price * (100 - discount_rate) / 100)|round(0, 'floor') %}
<span class="product__item-discount" style="color: red; font-weight: bold; margin-right: 10px;">-{{ discount_rate }}%</span>
<span>{{ discounted_price|price }}(税込)</span>
<br>
<span style="font-size: 0.9em; color: #999;">参考価格:
<span style="text-decoration: line-through;">{{ original_price|price }}(税込)</span>
</span>
{% else %}
<span>{{ Product.getPrice02IncTaxMin|price }}(税込)</span>
{% endif %}
</p>
{% if not Product.subscription %}
<a href="{{ url('product_detail', {'id': Product.id}) }}" class="product__item-btn">予約購入</a>
{% else %}
<a href="{{ url('product_detail', {'id': Product.id}) }}" class="product__item-btn">予約購入</a>
{% endif %}
<p style="color: red; padding: 5px 0; font-size: 12px;text-align: center;">※ こちらの商品は2月上旬にお届け予定です。</p>
</div>
</li>
{% endfor %}
</ul>
{% endif %}
{% include "pager.twig" with {'pages': pagination.paginationData} %}
</div>
</div>
</section>
{% endblock %}