app/template/akracing/Product/option_description.twig line 1

Open in your IDE?
  1. {#
  2. * Plugin Name : ProductOption
  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. {% for ProductOption in ProductOptions %}
  11.     {% set Option = ProductOption.Option %}
  12.     {% set Product = ProductOption.Product %}
  13.     {% if Option.description_flg == 1 %}
  14.         <div id="option_description_{{ Product.id }}_{{ Option.id }}" class="option_description">
  15.             <div class="modal-header">
  16.                 <div class="plainmodal-close">&#215;</div>
  17.                 <h4 class="modal-title">{{ Option.name }}</h4>
  18.                 <p>{{ Option.description|raw|nl2br }}</p>
  19.             </div>
  20.             {% if Option.OptionCategories|length > 0%}
  21.                 {# テキストボックス、テキストエリア、日付、数値入力タイプの場合 #}
  22.                 {% if Option.type == constant('Plugin\\ProductOption42\\Entity\\Option::TEXT_TYPE') or Option.type == constant('Plugin\\ProductOption42\\Entity\\Option::TEXTAREA_TYPE') or Option.type == constant('Plugin\\ProductOption42\\Entity\\Option::NUMBER_TYPE') or Option.type == constant('Plugin\\ProductOption42\\Entity\\Option::DATE_TYPE') %}
  23.                     <div class="modal-body">
  24.                         {% set optionCategory = Option.OptionCategories[0] %}
  25.                         <div>
  26.                             {% for OptionImage in optionCategory.OptionImages %}
  27.                                 <img src="{{ asset(OptionImage, 'save_image') }}"/>
  28.                             {% endfor %}
  29.                             {% if optionCategory.value|length > 0  %}
  30.                                 {% if optionCategory.value > 0  %}
  31.                                     <p class="plus">{{'productoption.product.option.description.price'|trans}}:{{ priceIncTax(optionCategory.value, Product)|price }} <span class="small">{{'productoption.product.option.description.inc_tax'|trans}}</span></p>
  32.                                 {% elseif optionCategory.value < 0 %}
  33.                                     <p class="minus">{{'productoption.product.option.description.price'|trans}}:{{ priceIncTax(optionCategory.value, Product)|price }} <span class="small">{{'productoption.product.option.description.inc_tax'|trans}}</span></p>
  34.                                 {% endif %}
  35.                             {% endif %}
  36.                             {% if optionCategory.delivery_free_flg == constant('Plugin\\ProductOption42\\Entity\\OptionCategory::ON') %}
  37.                                 <p>{{'productoption.common.delivery_free'|trans}}</p>
  38.                             {% endif %}
  39.                         </div>
  40.                     </div>
  41.                 {# プルダウン、ラジオボタン、チェックボックスタイプの場合 #}
  42.                 {% else %}
  43.                     <div class="modal-body">
  44.                         {% for optionCategory in Option.OptionCategories %}
  45.                             {% if optionCategory.disable_flg != constant('Plugin\\ProductOption42\\Entity\\OptionCategory::ON') %}
  46.                                 <div>
  47.                                     <h3>{{ optionCategory.name }}</h3>
  48.                                     {% for OptionImage in optionCategory.OptionImages %}
  49.                                         <img src="{{ asset(OptionImage, 'save_image') }}"/>
  50.                                     {% endfor %}
  51.                                     <p>{{ optionCategory.description|raw|nl2br }}</p>
  52.                                     {% if optionCategory.value|length > 0  %}
  53.                                         {% if optionCategory.value > 0  %}
  54.                                             <p class="plus">{{'productoption.product.option.description.price'|trans}}:{{ priceIncTax(optionCategory.value, Product)|price }} <span class="small">{{'productoption.product.option.description.inc_tax'|trans}}</span></p>
  55.                                         {% elseif optionCategory.value < 0 %}
  56.                                             <p class="minus">{{'productoption.product.option.description.price'|trans}}:{{ priceIncTax(optionCategory.value, Product)|price }} <span class="small">{{'productoption.product.option.description.inc_tax'|trans}}</span></p>
  57.                                         {% endif %}
  58.                                     {% endif %}
  59.                                     {% if optionCategory.delivery_free_flg == constant('Plugin\\ProductOption42\\Entity\\OptionCategory::ON') %}
  60.                                         <p>{{'productoption.common.delivery_free'|trans}}</p>
  61.                                     {% endif %}
  62.                                     <button class="btn-info" id="desc_btn_{{ Option.id }}_{{ optionCategory.id }}" >{{'productoption.product.option.description.select'|trans}}</button>
  63.                                 </div>
  64.                             {% endif %}
  65.                         {% endfor %}
  66.                     </div>
  67.                 {% endif %}
  68.             {% endif %}
  69.         </div>
  70.     {% endif %}
  71. {% endfor %}