<style>
#item-list-db #search_settings {
display: flex;
background-color: #f2f2f2;
border-top: none;
border-bottom: none;
letter-spacing: .1em;
margin-bottom: 5px;
padding: 14px 10px;
}
#item-list-db #search_settings .search-settings-box > * {
vertical-align: middle;
}
#item-list-db #search_settings .search-settings-box > span {
color: #333;
font-size: 14px;
line-height: 24px;
}
#item-list-db #search_settings .search-settings-box-left {
width: 40%;
}
#item-list-db #search_settings .search-settings-box-right {
width: 60%;
text-align: right;
}
#item-list-db #search_settings .search-settings-box-right > span {
margin-left: 2em;
}
#item-list-db #search_settings .search-settings-box-right select {
-webkit-appearance: none;
border-radius: 0;
font-size: 14px;
width: 130px;
padding-left: 2px;
height: 24px;
}
#item-list-db #search_settings .search-settings-box-right .search-settings-box-select-wrap {
display: inline-block;
position: relative;
}
#item-list-db #search_settings .search-settings-box-right .search-settings-box-select-wrap:after {
position: absolute;
content: '';
width: 4px;
height: 4px;
border: 2px solid;
border-color: #565656 #565656 transparent transparent;
transform: rotate(135deg);
top: 5px;
right: 6px;
}
#item-list-db .item-list-pagination .item-list-pagination-prev-next:before {
width: 10px;
height: 10px;
}
#item-list-db #glist {
width: 100%;
}
</style>
<div id="item-list-db">
{% set list_anchor_id = 'list_mark' %}
{% set category_name_p = '' %}
{% set category_name = data.main_category_name %}
{% if isMainCategory is defined and isMainCategory %}
{% if main_h3 is defined and main_h3 != '' %}
{% set category_name = main_h3 %}
{% elseif main_breadcrumb is defined and main_breadcrumb != '' %}
{% set category_name = main_breadcrumb %}
{% endif %}
{% set category_name_p = category_name %}
{% else %}
{% if category_h3 is defined and category_h3 != '' %}
{% set category_name = category_h3 %}
{% set category_name_p = category_name %}
{% elseif category_h1 is defined and category_h1 != '' %}
{% set category_name = category_h1 %}
{% set category_name_p = category_name %}
{% else %}
{% set category_name = seoKeywordTDK %}
{% set category_name_p = php_str_replace(" 全商品", "", category_name) %}
{% endif %}
{% endif %}
<!-- 並び順、ページングのさいは、商品DBにアンカーする -->
<script>
$( function(){
$('#search_settings option').each( function(){
var $option = $(this);
$option.val( $option.val() + '#{{ list_anchor_id }}');
});
$('.item-list-pagination .item-list-pagination-page > a').each( function(){
var $a = $(this);
$a.attr('href', $a.attr('href')+'#{{ list_anchor_id }}');
});
// 固定ヘッダー分のスクロールを調整
if( location.href.match(/#{{ list_anchor_id }}/) ){
// spはheader-navがないが、固定ヘッダー自体ないのでreturn falseで抜ける=そのままアンカーされればよい
var $fixedHeader = $('#header-nav');
if( $fixedHeader.length === 0 ) return false;
var $anchor = $('#{{ list_anchor_id }}');
setTimeout( function(){
$(window).scrollTop( $anchor.offset().top - $fixedHeader.outerHeight()); // 10は微調整
}, 800 );
}
});
</script>
<a id="{{ list_anchor_id }}"></a>
<div id="item-list-header" class="item-all">
<h2 id="heading-item-list">{{ category.titleForItemList }}商品一覧</h2>
<div id="search_settings">
<div class="search-settings-box search-settings-box-left">
<span>対象商品 {{ detailData.item_count }}件</span>
</div>
<div class="search-settings-box search-settings-box-right">
{% include 'Common/DisplayOrderPulldown.twig' %}
{% include 'Common/DisplayItemPulldown.twig' %}
</div>
</div>
{% if not app.request.query.get('no') %}
<p>{{ category.titleForItemList }}を販売するユニフォームの通販。常時20万点以上の豊富な品揃え。プリント・刺繍加工も対応中!</p>
{% endif %}
</div>
<!-- 検索結果が0件の場合 -->
{% if detailData is defined and detailData.item_count is defined and detailData.item_count == 0 %}
<div class="item-not-found">該当する条件の商品は見つかりませんでした。</div>
{% else %}
{% set col_count = detailData.col_count %}
{{ include('Block/product_item_list_common.twig') }}
{% endif %}
</div>