{% extends 'default_frame.twig' %}
{% block javascript %}
<script type="text/javascript">
$(window).on('load', function(){
$('.bxslider').bxSlider({
auto: true
});
});
</script>
{% endblock javascript %}
{% block main %}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
{# ▼ ブロック:DispHtag ▼ #}
{{ include('Block/DispHtag.twig') }}
{# ▲ ブロック:DispHtag ▲ #}
<title>ベースボール・マガジン社 BBM@BOOK CART</title>
<meta name="description" content="ベースボール・マガジン社が運営する総合スポーツサイト。ベースボール・マガジン社発行の書籍・雑誌・スポーツカードなどの新着情報、各競技の技術情報や専門家によるコラムなど、スポーツファンを応援する情報が満載です。">
<meta name="keywords" content="ベースボールマガジン社,BBM">
{# ▼ ブロック:DispHead ▼ #}
{{ include('Block/DispHead.twig') }}
{# ▲ ブロック:DispHead ▲ #}
</head>
<body id="pagetop">
{# ▼ ブロック:DispBtag ▼ #}
{{ include('Block/DispBtag.twig') }}
{# ▲ ブロック:DispBtag ▲ #}
{# ▼ ブロック:DispHeader ▼ #}
{{ include('Block/DispHeader.twig') }}
{# ▲ ブロック:DispHeader ▲ #}
<div id="main-content" style="background-image: linear-gradient(#f9f9f9, #eee);">
{% set Cate2nd = null %}
{% if Category is not empty %}
{% if Category.hierarchy == 2 %}
{% set Cate2nd = Category %}
{% endif %}
{% for category in Category.parents %}
{% if category.hierarchy > 1 %}
{% if category.hierarchy == 2 %}
{% set Cate2nd = category %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
<!--▼ SECTION ▼-->
<section id="category">
<h2>商品ジャンルを選ぶ</h2>
<nav>
<ul class="clearfix">
{% if Cate2nd %}
{% for child_category in Cate2nd.children|reverse %}
{% if child_category.dspfl == 1 %}
<li><a href="{{ path('product_list', {cateid: child_category.id}) }}">{{ child_category.name }}</a></li>
{% endif %}
{% endfor %}
{% endif %}
</ul>
</nav>
</section>
<!--▲ SECTION ▲-->
{% for Product in pagination %}
{# カテゴリーの最下位 #}
{% set lowcateid = 0 %}
{% set hierarchy = 0 %}
{% for ProductCategory in Product.ProductCategories %}
{% if hierarchy < ProductCategory.Category.hierarchy %}
{% set lowcateid = ProductCategory.Category.id %}
{% endif %}
{% endfor %}
<table border="0" cellpadding="0" cellspacing="0" class="magazinebox">
<tr>
<td colspan="2"><div class="magtop1"> </div></td>
</tr>
<tr>
<td width="120" valign="top" style="padding-left:10px;">
{% if Product.linkurl %}
<a href="{{ Product.linkurl }}">
{% else %}
<a href="{{ url('product_detail', {'id': Product.id}) }}">
{% endif %}
<img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" alt="{{ Product.name }}" style="width:120px; margin-right:5px;" />
</a>
</td>
<td rowspan="2" valign="top" class="magbg">
<h3>
{% if Product.linkurl %}
<a href="{{ Product.linkurl }}" class="ui-link">
{% else %}
<a href="{{ url('product_detail', {'id': Product.id}) }}" class="ui-link">
{% endif %}
{{ Product.name|raw|nl2br }}
</a>
</h3>
{{ Product.hatsubaibi }}<br>
{{ Product.teikaref }}
<!-- ▼ 販売価格 ▼ -->
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|number_format }}円(税込)
{% else %}
{{ Product.getPrice02IncTaxMin|number_format }} ~ {{ Product.getPrice02IncTaxMax|number_format }}円(税込)
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|number_format }}円(税込)
{% endif %}
<!-- ▲ 販売価格 ▲ -->
<!-- ▼ 商品コード ▼ -->
{% if Product.code_min is not empty %}
<br>{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}
{% endif %}
<!-- ▲ 商品コード ▲ -->
{% if Product.description_list %}
<div style="margin-top:8px;">{{ Product.description_list|raw|nl2br }}</div>
{% endif %}
</td>
</tr>
<tr>
<td valign="bottom" align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a href="{{ url('product_list', {'cateid': lowcateid}) }}" class="ui-link">一覧を見る</a></td>
<td><img src="{{ asset('common_img/marker-f.gif', 'user_data') }}" alt="" width="18" height="18" vspace="5"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2"><div class="magbottom1"> </div></td>
</tr>
</table>
{% endfor %}
<!--▼ページナビ-->
{% include "productpager.twig" with {'pages': pagination.paginationData} %}
<!--▲ページナビ-->
<!--▼ SECTION ▼-->
<!--▼ BNR ▼-->
<section id="mainbnr2">
<div class="bxslider">
{% if Banners %}
{% for Banner in Banners %}
{% for cnt in 1..30 %}
{% set cntdsp = '%02d'|format(cnt) %}
{% set image = Banner['image'~cntdsp] %}
{% set link = Banner['link'~cntdsp] %}
{% set blank = Banner['blank'~cntdsp] %}
{% if image %}
{% if blank == 1 %}
{% set dspBlank = 'target="_blank"' %}
{% else %}
{% set dspBlank = '' %}
{% endif %}
<a href="{{ link }}" {{ dspBlank }}><img src="{{ asset('', 'save_image') }}/visual_{{ Banner.id }}/{{ image }}" width="240"></a>
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
</div>
</section>
<!--▲ BNR ▲-->
<!--▲ SECTION ▲-->
<!--▼ SECTION ▼-->
<section id="category">
<h2>スポーツカテゴリで商品を探す</h2>
<nav>
<ul class="clearfix">
{% if sortedChildren %}
{% for child_category in sortedChildren %}
{% if child_category.dspfl == 1 %}
<li><a href="{{ path('product_list', {cateid: child_category.id}) }}">{{ child_category.name }}</a></li>
{% endif %}
{% endfor %}
{% endif %}
</ul>
</nav>
</section>
<!--▲ SECTION ▲-->
{# ▼ ブロック:DispFooter ▼ #}
{{ include('Block/DispFooter.twig') }}
{# ▲ ブロック:DispFooter ▲ #}
{# ▼ ブロック:DispFtag ▼ #}
{{ include('Block/DispFtag.twig') }}
{# ▲ ブロック:DispFtag ▲ #}
</div>
<!--▲ CONTAINER ▲-->
</body>
</html>
{% endblock %}
{# ▲ main ▲ #}