app/template/default/Block/sub_header_countertop.twig line 1

Open in your IDE?
  1. {% set sidebar_type = 0 %}
  2. {# 商品詳細からの場合 #}
  3. {% if Product is defined %}
  4. {% if Product.ProductCategories is not empty %}
  5.     {% for ProductCategory in Product.ProductCategories %}
  6.         {% for Path in ProductCategory.Category.path %}
  7.             {% if Path.hierarchy == 2 %}
  8.                 {% if Path.name == 'カウンタートップタイプ浄水器' %}
  9.                     {% set sidebar_type = 1 %}
  10.                 {% endif %}
  11.                 {% if Path.name == 'ビルトイン浄水器' %}
  12.                     {% set sidebar_type = 2 %}
  13.                 {% endif %}
  14.             {% endif %}
  15.             {% if Path.hierarchy == 3 %}
  16.                 {% if sidebar_type == 1 %}
  17.                     {% set sidebar_type = 0 %}
  18.                 {% endif %}
  19.                 {% if sidebar_type == 2 %}
  20.                     {% set sidebar_type = 0 %}
  21.                 {% endif %}
  22.             {% endif %}
  23.         {% endfor %}
  24.     {% endfor %}
  25. {% endif %}
  26. {% endif %}
  27. {# 商品一覧からの場合 #}
  28. {% if Category is defined %}
  29. {% if Category is not null %}
  30.     {% for Path in Category.path %}
  31.         {% if Path.hierarchy == 2 %}
  32.             {% if Path.name == 'カウンタートップタイプ浄水器' %}
  33.                 {% set sidebar_type = 1 %}
  34.             {% endif %}
  35.             {% if Path.name == 'ビルトイン浄水器' %}
  36.                 {% set sidebar_type = 2 %}
  37.             {% endif %}
  38.         {% endif %}
  39.         {% if Path.hierarchy == 3 %}
  40.             {% if sidebar_type == 1 %}
  41.                 {% set sidebar_type = 0 %}
  42.             {% endif %}
  43.             {% if sidebar_type == 2 %}
  44.                 {% set sidebar_type = 0 %}
  45.             {% endif %}
  46.         {% endif %}
  47.     {% endfor %}
  48. {% endif %}
  49. {% endif %}
  50. {% block javascript %}
  51.     <script>
  52.         $(function() {
  53.             $('#support_check').on('click', function(e) {
  54.                 var href = $(this).data('href');
  55.                 window.open(href, "_blank");
  56.             });
  57.         });
  58.         
  59.     </script>
  60. {% endblock %}
  61. {# カウンタートップタイプ浄水器の場合 #}
  62. {% if sidebar_type == 1 %}
  63. <div style="padding-left: 15px;padding-right: 15px;padding-bottom: 15px;">
  64. <br/>
  65. {#<h1 style="color:#1266ac; font-size:200%;">カウンタートップ浄水器</h1>#}
  66. <h1 style="color:#1266ac; font-size:200%;">
  67. 浄水器本体はシンクの上に置く、設置が簡単な据置タイプ。
  68. </h1>
  69. <br/>
  70. <p class="content-text">
  71. キッチンの蛇口の形状によって取付可否がございます。
  72. <br/>
  73. ご検討の際は「水栓チェック」ページにてご確認ください。
  74. <br/>
  75. </p>
  76. <br/>
  77. <div class="ec-productRole__btn">
  78.     <button id="support_check" type="button" class="ec-blockBtn--action" style="width: auto;height:30px;line-height:30px" data-href="https://multipure.co.jp/support/check/">
  79.         {{ '水栓チェック'|trans }}
  80.     </button>
  81. </div>
  82. </div>
  83. {% endif %}
  84. {# ビルトイン浄水器 #}
  85. {% if sidebar_type == 2 %}
  86. {% endif %}