{#
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' %}
{% set category = app.request.get('category_id') %}
{% set categoryId = app.request.get('category_id')|default(8) %}
{% block javascript %}
<script>
$(function() {
// 表示件数を変更
$('.disp-number').change(function() {
var dispNumber = $(this).val();
$('#disp_number').val(dispNumber);
$('#pageno').val(1);
$("#form1").submit();
});
// 並び順を変更
$('.order-by').change(function() {
var orderBy = $(this).val();
$('#orderby').val(orderBy);
$('#pageno').val(1);
$("#form1").submit();
});
$('.add-cart').on('click', function(e) {
var $form = $(this).parents('li').find('form');
// 個数フォームのチェック
var $quantity = $form.parent().find('.quantity');
if ($quantity.val() < 1) {
$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
setTimeout(function() {
loadingOverlay('hide');
}, 100);
return true;
} else {
$quantity[0].setCustomValidity('');
}
e.preventDefault();
$.ajax({
url: $form.attr('action'),
type: $form.attr('method'),
data: $form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
$.each(data.messages, function() {
$('#ec-modal-header').text(this);
});
$('.ec-modal').show()
// カートブロックを更新する
$.ajax({
url: '{{ url('block_cart') }}',
type: 'GET',
dataType: 'html'
}).done(function(html) {
$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('{{ 'カートへの追加に失敗しました。'|trans }}');
}).always(function(data) {
// Buttonを有効にする
$('.add-cart').prop('disabled', false);
});
});
});
$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
$('.ec-modal').hide()
});
</script>
{% if categoryId == 8 %}
<script src="/html/user_data/assets/js/itemload/category-top.js"></script>
{% endif %}
{% endblock %}
{% block main %}
<link rel="stylesheet" href="/html/user_data/assets/js/slick-1.6.0/slick.css">
<script src="/html/user_data/assets/js/slick-1.6.0/slick.min.js"></script>
<script>
$(function(){
$(".top-main2-gallery").slick({
autoplay: true,
autoplaySpeed: 0,
speed: 10000,
cssEase: "linear",
dots: false,
arrows:false,
slidesToShow: 1,
variableWidth: true,
responsive: [
{
breakpoint: 750,
settings: {
variableWidth: false,
}
}
]
});
});
</script>
<section class="top-main2">
<img src="/html/user_data/assets/img/common/top/txt--main-01.svg" alt="選ぶ時間も、味わう時間も豊かに" class="top-main2__catch01">
<img src="/html/user_data/assets/img/common/top/txt--main-02.svg" alt="Your naturals" class="top-main2__catch02">
<ul class="top-main2-gallery">
<li class="top-main2-gallery__item">
<img src="/html/user_data/assets/img/common/top/pic--gallery-01.webp" alt="">
</li>
<li class="top-main2-gallery__item">
<img src="/html/user_data/assets/img/common/top/pic--gallery-02.webp" alt="">
</li>
<li class="top-main2-gallery__item">
<img src="/html/user_data/assets/img/common/top/pic--gallery-03.webp" alt="">
</li>
<li class="top-main2-gallery__item">
<img src="/html/user_data/assets/img/common/top/pic--gallery-04.webp" alt="">
</li>
<li class="top-main2-gallery__item">
<img src="/html/user_data/assets/img/common/top/pic--gallery-05.webp" alt="">
</li>
<li class="top-main2-gallery__item">
<img src="/html/user_data/assets/img/common/top/pic--gallery-06.webp" alt="">
</li>
<li class="top-main2-gallery__item">
<img src="/html/user_data/assets/img/common/top/pic--gallery-07.webp" alt="">
</li>
<li class="top-main2-gallery__item">
<img src="/html/user_data/assets/img/common/top/pic--gallery-08.webp" alt="">
</li>
</ul>
</section>
{% if categoryId == 8 %}
<!--<div class="category-search-wrap hide">
<button class="category-search-btn">開く</button>
<div class="category-search">
<ul class="category-search__tab">
<li><a href="#type">種類</a></li>
<li><a href="#area">地域</a></li>
<li><a href="#breed">品種</a></li>
<li><a href="#category">カテゴリー</a></li>
<li><a href="#scene">シーン別</a></li>
<li><a href="#price">値段から</a></li>
</ul>
<div id="type" class="active category-search-block">
<ul class="category-search__list">
{% set Categories = repository('Eccube\\Entity\\Category').getList(repository('Eccube\\Entity\\Category').find(8)) %}
{% macro tree(Category) %}
{% from _self import tree %}
<li>
<a href="{{ url('product_list') }}?category_id={{ Category.id }}">
{{ Category.name }}
</a>
{% if Category.children|length > 0 %}
<ul>
{% for ChildCategory in Category.children %}
<li>
{{ tree(ChildCategory) }}
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endmacro %}
{# @see https://github.com/bolt/bolt/pull/2388 #}
{% from _self import tree %}
{% for Category in Categories %}
<li>
{{ tree(Category) }}
</li>
{% endfor %}
</ul>
</div>
<div id="area" class="category-search-block">
<ul class="category-search__list">
{% set Categories = repository('Eccube\\Entity\\Category').getList(repository('Eccube\\Entity\\Category').find(21)) %}
{% macro tree(Category) %}
{% from _self import tree %}
<li>
<a href="{{ url('product_list') }}?category_id={{ Category.id }}">
{{ Category.name }}
</a>
</li>
{% endmacro %}
{# @see https://github.com/bolt/bolt/pull/2388 #}
{% from _self import tree %}
{% for Category in Categories %}
<li>
{{ tree(Category) }}
</li>
{% endfor %}
</ul>
</div>
<div id="breed" class="category-search-block">
<ul class="category-search__list">
<li><a href="#">品種</a></li>
<li><a href="#">品種</a></li>
<li><a href="#">品種</a></li>
<li><a href="#">品種</a></li>
<li><a href="#">品種</a></li>
</ul>
</div>
<div id="category" class="category-search-block">
<ul class="category-search__list">
<li><a href="#">カテゴリ</a></li>
<li><a href="#">カテゴリ</a></li>
<li><a href="#">カテゴリ</a></li>
<li><a href="#">カテゴリ</a></li>
<li><a href="#">カテゴリ</a></li>
</ul>
</div>
<div id="scene" class="category-search-block">
<ul class="category-search__list">
<li><a href="#">フランス</a></li>
<li><a href="#">フランス</a></li>
<li><a href="#">フランス</a></li>
<li><a href="#">フランス</a></li>
<li><a href="#">フランス</a></li>
</ul>
</div>
<div id="price" class="category-search-block">
<ul class="category-search__list">
<li><a href="#">1000円〜2000円</a></li>
<li><a href="#">1000円〜2000円</a></li>
<li><a href="#">1000円〜2000円</a></li>
<li><a href="#">1000円〜2000円</a></li>
<li><a href="#">1000円〜2000円</a></li>
</ul>
</div>
</div>
</div>--><!-- /.category-search-wrap-->
{% endif %}
<div class="product-container layout-container contents wine-{{categoryId}}">
<!-- test -->
<!--
{% set Categories = repository('Eccube\\Entity\\Category').getList(repository('Eccube\\Entity\\Category').find(8)) %}
{% macro tree(Category) %}
{% from _self import tree %}
<a href="{{ url('product_list') }}?category_id={{ Category.id }}">
{{ Category.name }}
</a>
{% if Category.children|length > 0 %}
<ul>
{% for ChildCategory in Category.children %}
<li>
{{ tree(ChildCategory) }}
</li>
{% endfor %}
</ul>
{% endif %}
{% endmacro %}
{# @see https://github.com/bolt/bolt/pull/2388 #}
{% from _self import tree %}
<div class="ec-categoryNaviRole">
<div class="ec-itemNav">
<ul class="ec-itemNav__nav">
{% for Category in Categories %}
<li>
{{ tree(Category) }}
</li>
{% endfor %}
</ul>
</div>
</div>
-->
<!-- testend -->
{% if categoryId == 8 %}
<!--<ol class="topic-path">
<li>ALL WINE</li>
</ol>-->
<h1 class="wine-list__page-title">WINE LIST</h1>
<p class="wine-list__area">
Gamay , Cinsault , Lambrusco , Nebbiolo , Primitivo , Pinot Noir , Gamay , Cinsault , Lambrusco , Nebbiolo , Primitivo , Pinot Noir , Gamay , Cinsault , Lambrusco , Nebbiolo , Primitivo , Pinot Noir , Gamay , Cinsault , Lambrusco , Nebbiolo , Primitivo , Pinot Noir ,
</p>
<div class="wine-list__nav-wrap">
<ul class="wine-list__nav">
<li><a href="https://wineshop.salond.jp/products/list?category_id=10"><span>赤ワイン</span></a></li>
<li><a href="https://wineshop.salond.jp/products/list?category_id=13"><span>白ワイン</span></a></li>
<li><a href="https://wineshop.salond.jp/products/list?category_id=14"><span>スパークリング</span></a></li>
<li><a href="https://wineshop.salond.jp/products/list?category_id=15"><span>ロゼ</span></a></li>
<li><a href="https://wineshop.salond.jp/products/list?category_id=16"><span>オレンジ</span></a></li>
</ul>
</div>
<!--<section class="product-recommend">
<h2 class="product-recommend__title">今月のおすすめ</h2>
<section id="recommend"></section>
</section>--><!-- /.product-recommend -->
{% else %}
{% endif %}
<ul class="product-list">
{% for Product in Products %}
{% if Product.ProductCategories is not empty %}
{% set categoryIds = [] %}
{% for ProductCategory in Product.ProductCategories %}
{% set categoryIds = categoryIds|merge([ProductCategory.CategoryId]) %}
{% endfor %}
<li class="type-{{ categoryIds|join(' type-') }}">
{% else %}
<li>
{% endif %}
<a href="{{ url('product_detail', {'id': Product.id}) }}">
<div class="product-list__pic"><img class="" src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" alt="{{ Product.name }}" {% if loop.index > 5 %} loading="lazy"{% endif %}></div>
<p class="product-list__title">
{{ Product.name }}
</p>
<span class="product-list__price">
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|price }}
{% else %}
{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|price }}
{% endif %}
<span>(税込み)</span></span>
</a>
</li>
{% endfor %}
<!-- /.product-list-wrap --></ul>
<a href="https://wineshop.salond.jp/products/list" class="btn--show">全ラインナップを見る</a>
<!-- /.product-container --></div>
{% endblock %}