app/Plugin/SearchPlus/Resource/template/default/Product/list_result.twig line 1

Open in your IDE?
  1. {#
  2. * Plugin Name : SearchPlus
  3. *
  4. * Copyright (C) BraTech Co., Ltd. All Rights Reserved.
  5. * http://www.bratech.co.jp/
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. #}
  10. <div id="search_plus" style="display:none;">
  11.     <br>
  12.     {% if search_form.maker_id is defined and search_form.vars.value.maker_id|length > 0 %}
  13.         <li class="ec-topicpath__item">{{ 'maker.admin.maker'|trans }}:
  14.             {% for Maker in search_form.vars.value.maker_id %}
  15.                 {{ Maker.name }}{% if not loop.last %},{% endif %}
  16.             {% endfor %}
  17.         </li><br>
  18.     {% endif %}
  19.     {% if search_form.vars.value.tag_id|length > 0 %}
  20.         <li class="ec-topicpath__item">{{ 'searchplus.block.search_tag'|trans }}:
  21.             {% for Tag in search_form.vars.value.tag_id %}
  22.                 {{ Tag }}{% if not loop.last %},{% endif %}
  23.             {% endfor %}
  24.         </li><br>
  25.     {% endif %}
  26.     {% if search_form.vars.value.pmin or search_form.vars.value.pmax %}
  27.         <li class="ec-topicpath__item">{{ 'searchplus.block.search_price'|trans }}:
  28.     {% endif %}
  29.     {% if search_form.vars.value.pmin %}
  30.         ¥{{ search_form.vars.value.pmin|number_format }}
  31.     {% endif %}
  32.     {% if search_form.vars.value.pmin or search_form.vars.value.pmax %}~{% endif %}
  33.     {% if search_form.vars.value.pmax %}
  34.         ¥{{ search_form.vars.value.pmax|number_format }}
  35.     {% endif %}
  36.     {% if search_form.vars.value.pmin or search_form.vars.value.pmax %}
  37.     </li><br>
  38.     {% endif %}
  39.     {% if search_form.vars.value.instock %}
  40.         <li class="ec-topicpath__item">{{ 'searchplus.block.label.instock'|trans }}</li><br>
  41.     {% endif %}
  42.     {% if ProductItems is defined %}
  43.         {% for ProductItem in ProductItems %}
  44.             {% if  ProductItem.input_type == constant('Plugin\\ProductPlus\\Entity\\ProductItem::DATE_TYPE') %}
  45.                 {% set name_start = 'productplus_' ~ ProductItem.id ~ '_date_start' %}
  46.                 {% set name_end = 'productplus_' ~ ProductItem.id ~ '_date_end' %}
  47.                 {% if search_form.vars.value[name_start] or search_form.vars.value[name_end] %}
  48.                     <li class="ec-topicpath__item">{{ ProductItem.name }}:
  49.                 {% endif %}
  50.                 {% if search_form.vars.value[name_start] %}
  51.                     {{ search_form.vars.value[name_start]|date('Y/m/d') }}
  52.                 {% endif %}
  53.                 {% if search_form.vars.value[name_start] or search_form.vars.value[name_end] %}~{% endif %}
  54.                 {% if search_form.vars.value[name_end] %}
  55.                     {{ search_form.vars.value[name_end]|date('Y/m/d') }}
  56.                 {% endif %}
  57.                 {% if search_form.vars.value[name_start] or search_form.vars.value[name_end] %}
  58.                     </li><br>
  59.                 {% endif %}
  60.             {% else %}
  61.                 {% set name = 'productplus_' ~ ProductItem.id %}
  62.                 {% if search_form.vars.value[name] is defined  and search_form.vars.value[name] %}
  63.                     {% if search_form.vars.value[name] is iterable %}
  64.                         <li class="ec-topicpath__item">{{ ProductItem.name}}:
  65.                             {% for choice in search_form[name].vars.choices %}
  66.                                 {% for data in search_form[name].vars.value %}
  67.                                     {% if choice.value == data %}{{ choice.label }}{% if not loop.last %},{% endif %}{% endif %}
  68.                                 {% endfor %}
  69.                             {% endfor %}
  70.                         </li><br>
  71.                     {% else %}
  72.                         <li class="ec-topicpath__item">{{ ProductItem.name}}:{{ search_form.vars.value[name] }}</li><br>
  73.                     {% endif %}
  74.                 {% endif %}
  75.             {% endif %}
  76.         {% endfor %}
  77.     {% endif %}
  78. </div>