app/template/smartphone/Product/catelist.twig line 1

Open in your IDE?
  1. {% extends 'default_frame.twig' %}
  2. {% block javascript %}
  3.     <script type="text/javascript">
  4.         $(window).on('load', function(){
  5.             $('.bxslider').bxSlider({
  6.                 auto: true
  7.             });
  8.         });
  9.     </script>
  10. {% endblock javascript %}
  11. {% block main %}
  12. <!DOCTYPE html>
  13. <html>
  14. <head>
  15. <meta charset="UTF-8">
  16. {# ▼ ブロック:DispHtag ▼ #}
  17. {{ include('Block/DispHtag.twig') }}
  18. {# ▲ ブロック:DispHtag ▲ #}
  19. <title>ベースボール・マガジン社 BBM@BOOK CART</title>
  20. <meta name="description" content="ベースボール・マガジン社が運営する総合スポーツサイト。ベースボール・マガジン社発行の書籍・雑誌・スポーツカードなどの新着情報、各競技の技術情報や専門家によるコラムなど、スポーツファンを応援する情報が満載です。">
  21. <meta name="keywords" content="ベースボールマガジン社,BBM">
  22. {# ▼ ブロック:DispHead ▼ #}
  23. {{ include('Block/DispHead.twig') }}
  24. {# ▲ ブロック:DispHead ▲ #}
  25. </head>
  26. <body id="pagetop">
  27. {# ▼ ブロック:DispBtag ▼ #}
  28. {{ include('Block/DispBtag.twig') }}
  29. {# ▲ ブロック:DispBtag ▲ #}
  30. {# ▼ ブロック:DispHeader ▼ #}
  31. {{ include('Block/DispHeader.twig') }}
  32. {# ▲ ブロック:DispHeader ▲ #}
  33. <div id="main-content" style="background-image: linear-gradient(#f9f9f9, #eee);">
  34.     {% set Cate2nd = null %}
  35.     {% if Category is not empty %}
  36.         {% if Category.hierarchy == 2 %}
  37.             {% set Cate2nd = Category %}
  38.         {% endif %}
  39.         {% for category in Category.parents %}
  40.             {% if category.hierarchy > 1 %}
  41.                 {% if category.hierarchy == 2 %}
  42.                     {% set Cate2nd = category %}
  43.                 {% endif %}
  44.             {% endif %}
  45.         {% endfor %}
  46.     {% endif %}
  47.     <!--▼ SECTION ▼-->
  48.     <section id="category">
  49.       <h2>商品ジャンルを選ぶ</h2>
  50.       <nav>
  51.         <ul class="clearfix">
  52.             {% if Cate2nd %}
  53.                 {% for child_category in Cate2nd.children|reverse %}
  54.                     {% if child_category.dspfl == 1 %}
  55.                         <li><a href="{{ path('product_list', {cateid: child_category.id}) }}">{{ child_category.name }}</a></li>
  56.                     {% endif %}
  57.                 {% endfor %}
  58.             {% endif %}
  59.         </ul>
  60.       </nav>
  61.     </section>
  62.     <!--▲ SECTION ▲-->
  63.     {% for Product in pagination %}
  64.         {# カテゴリーの最下位 #}
  65.         {% set lowcateid = 0 %}
  66.         {% set hierarchy = 0 %}
  67.         {% for ProductCategory in Product.ProductCategories %}
  68.             {% if hierarchy < ProductCategory.Category.hierarchy %}
  69.                 {% set lowcateid = ProductCategory.Category.id %}
  70.             {% endif %}
  71.         {% endfor %}
  72.         <table border="0" cellpadding="0" cellspacing="0" class="magazinebox">
  73.             <tr>
  74.                 <td colspan="2"><div class="magtop1">&nbsp;</div></td>
  75.             </tr>
  76.             <tr>
  77.                 <td width="120" valign="top" style="padding-left:10px;">
  78.                     {% if Product.linkurl %}
  79.                           <a href="{{ Product.linkurl }}">
  80.                       {% else %}
  81.                           <a href="{{ url('product_detail', {'id': Product.id}) }}">
  82.                       {% endif %}
  83.                       <img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" alt="{{ Product.name }}" style="width:120px; margin-right:5px;" />
  84.                     </a>
  85.                 </td>
  86.                 <td rowspan="2" valign="top" class="magbg">
  87.                     <h3>
  88.                     {% if Product.linkurl %}
  89.                         <a href="{{ Product.linkurl }}" class="ui-link">
  90.                     {% else %}
  91.                         <a href="{{ url('product_detail', {'id': Product.id}) }}" class="ui-link">
  92.                     {% endif %}
  93.                             {{ Product.name|raw|nl2br }}
  94.                         </a>
  95.                     </h3>
  96.                     {{ Product.hatsubaibi }}<br>
  97.                     {{ Product.teikaref }}&nbsp;
  98.                     <!-- ▼ 販売価格 ▼ -->
  99.                     {% if Product.hasProductClass %}
  100.                         {% if Product.getPrice02Min == Product.getPrice02Max %}
  101.                             {{ Product.getPrice02IncTaxMin|number_format }}円(税込)
  102.                         {% else %}
  103.                             {{ Product.getPrice02IncTaxMin|number_format }} ~ {{ Product.getPrice02IncTaxMax|number_format }}円(税込)
  104.                         {% endif %}
  105.                     {% else %}
  106.                         {{ Product.getPrice02IncTaxMin|number_format }}円(税込)
  107.                     {% endif %}
  108.                     <!-- ▲ 販売価格 ▲ -->
  109.                     <!-- ▼ 商品コード ▼ -->
  110.                     {% if Product.code_min is not empty %}
  111.                         <br>{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}
  112.                     {% endif %}
  113.                     <!-- ▲ 商品コード ▲ -->
  114.                     {% if Product.description_list %}
  115.                         <div style="margin-top:8px;">{{ Product.description_list|raw|nl2br }}</div>
  116.                     {% endif %}
  117.                 </td>
  118.             </tr>
  119.             <tr>
  120.                 <td valign="bottom" align="center">
  121.                     <table border="0" cellpadding="0" cellspacing="0">
  122.                         <tr>
  123.                             <td><a href="{{ url('product_list', {'cateid': lowcateid}) }}" class="ui-link">一覧を見る</a></td>
  124.                             <td><img src="{{ asset('common_img/marker-f.gif', 'user_data') }}" alt="" width="18" height="18" vspace="5"></td>
  125.                         </tr>
  126.                     </table>
  127.                 </td>
  128.             </tr>
  129.             <tr>
  130.                 <td colspan="2"><div class="magbottom1">&nbsp;</div></td>
  131.             </tr>
  132.         </table>
  133.     {% endfor %}
  134.     <!--▼ページナビ-->
  135.     {% include "productpager.twig" with {'pages': pagination.paginationData} %}
  136.     <!--▲ページナビ-->
  137.     <!--▼ SECTION ▼-->
  138.     <!--▼ BNR ▼-->
  139.     <section id="mainbnr2">
  140.         <div class="bxslider">
  141.             {% if Banners %}
  142.                 {% for Banner in Banners %}
  143.                     {% for cnt in 1..30 %}
  144.                         {% set cntdsp = '%02d'|format(cnt) %}
  145.                         {% set image = Banner['image'~cntdsp] %}
  146.                         {% set link = Banner['link'~cntdsp] %}
  147.                         {% set blank = Banner['blank'~cntdsp] %}
  148.                         {% if image %}
  149.                             {% if blank == 1 %}
  150.                                 {% set dspBlank = 'target="_blank"' %}
  151.                             {% else %}
  152.                                 {% set dspBlank = '' %}
  153.                             {% endif %}
  154.                             <a href="{{ link }}" {{ dspBlank }}><img src="{{ asset('', 'save_image') }}/visual_{{ Banner.id }}/{{ image }}" width="240"></a>
  155.                         {% endif %}
  156.                     {% endfor %}
  157.                 {% endfor %}
  158.             {% endif %}
  159.         </div>
  160.     </section>
  161.     <!--▲ BNR ▲-->
  162.     <!--▲ SECTION ▲-->
  163.     <!--▼ SECTION ▼-->
  164.     <section id="category">
  165.         <h2>スポーツカテゴリで商品を探す</h2>
  166.         <nav>
  167.             <ul class="clearfix">
  168.                 {% if sortedChildren %}
  169.                     {% for child_category in sortedChildren %}
  170.                         {% if child_category.dspfl == 1 %}
  171.                             <li><a href="{{ path('product_list', {cateid: child_category.id}) }}">{{ child_category.name }}</a></li>
  172.                         {% endif %}
  173.                     {% endfor %}
  174.                 {% endif %}
  175.             </ul>
  176.         </nav>
  177.     </section>
  178.     <!--▲ SECTION ▲-->
  179. {# ▼ ブロック:DispFooter ▼ #}
  180. {{ include('Block/DispFooter.twig') }}
  181. {# ▲ ブロック:DispFooter ▲ #}
  182. {# ▼ ブロック:DispFtag ▼ #}
  183. {{ include('Block/DispFtag.twig') }}
  184. {# ▲ ブロック:DispFtag ▲ #}
  185. </div>
  186. <!--▲ CONTAINER ▲-->
  187. </body>
  188. </html>
  189. {% endblock %}
  190. {# ▲ main ▲ #}