app/template/default/Product/components/detail_product/price.twig line 1

Open in your IDE?
  1. {% set ifPrice = 'no2' %}
  2. {% if ifPrice is same as ('no1') %}
  3. {% if Product.getPrice01Min %}
  4.     <div class="ec-productRole__priceRegular price">
  5.         {% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
  6.             <span class="ec-productRole__priceRegularPrice">{{ '通常価格'|trans }}:<span class="price01-default">{{ Product.getPrice01IncTaxMin|number_format }}円</span></span>
  7.             <span class="ec-productRole__priceRegularTax">{{ '(税込)'|trans }}</span>
  8.         {% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
  9.             <span class="ec-productRole__priceRegularPrice">{{ '通常価格'|trans }}:<span class="price01-default">{{ Product.getPrice01IncTaxMin|number_format }}円~ 
  10.                 {# {{ Product.getPrice01IncTaxMax|price }} #}
  11.             </span></span>
  12.             <span class="ec-productRole__priceRegularTax">{{ '(税込)'|trans }}</span>
  13.         {% endif %}
  14.     </div>
  15. {% else %}
  16.     {% if Product.getPrice01Max is not null %}
  17.         <span class="ec-productRole__priceRegularPrice">{{ '通常価格'|trans }}:{{ Product.getPrice01IncTaxMin|number_format }}</span>
  18.         <span class="ec-productRole__priceRegularTax">{{ '(税込)'|trans }}</span>
  19.     {% endif %}
  20. {% endif %}
  21. {# 販売価格 #}
  22. <div class="ec-productRole__price price">
  23.     {# {% if Product.hasProductClass -%} #}
  24.     {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  25.         <div class="ec-price">
  26.             価格:<span class="spanPrice ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|number_format }}円</span>
  27.             <span class="ec-price__tax">{{ '(税込)'|trans }}</span>
  28.         </div>
  29.     {% else %}
  30.         <div class="ec-price">
  31.             価格:<span class="spanPrice ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|number_format }}円~
  32.             {# {{ Product.getPrice02IncTaxMax|price }} #}
  33.         </span>
  34.         <span class="ec-price__tax">{{ '(税込)'|trans }}</span>
  35.     </div>
  36. {% endif %}
  37. {#                         {% else %}
  38. <div class="ec-price">
  39. 価格:<span class="spanPrice ec-price__price">{{ Product.getPrice02IncTaxMin|number_format }}円</span>
  40. <span class="ec-price__tax">{{ '税込'|trans }}</span>
  41. </div>
  42. {% endif %} #}
  43. </div>
  44. {% endif %}
  45. {% if ifPrice is same as ('no2') %}
  46. {% if Product.getPrice01Min %}
  47.     <div class="ec-productRole__priceRegular price">
  48.         {% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
  49.             <span class="ec-productRole__priceRegularPrice">{{ '通常価格'|trans }}:<span class="price01-default">¥{{ Product.getPrice01IncTaxMin|number_format }}</span></span>
  50.             <span class="ec-productRole__priceRegularTax">{{ '(税込)'|trans }}</span>
  51.         {% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
  52.             <span class="ec-productRole__priceRegularPrice">{{ '通常価格'|trans }}:<span class="price01-default">¥{{ Product.getPrice01IncTaxMin|number_format }}~ 
  53.                 {# {{ Product.getPrice01IncTaxMax|price }} #}
  54.             </span></span>
  55.             <span class="ec-productRole__priceRegularTax">{{ '(税込)'|trans }}</span>
  56.         {% endif %}
  57.     </div>
  58. {% else %}
  59.     {% if Product.getPrice01Max is not null %}
  60.         <span class="ec-productRole__priceRegularPrice">{{ '通常価格'|trans }}:{{ Product.getPrice01IncTaxMin|number_format }}</span>
  61.         <span class="ec-productRole__priceRegularTax">{{ '(税込)'|trans }}</span>
  62.     {% endif %}
  63. {% endif %}
  64. {# 販売価格 #}
  65. <div class="ec-productRole__price price">
  66.     {# {% if Product.hasProductClass -%} #}
  67.     {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  68.         <div class="ec-price">
  69.             価格:<span class="spanPrice ec-price__price price02-default">¥{{ Product.getPrice02IncTaxMin|number_format }}</span>
  70.             <span class="ec-price__tax">{{ '(税込)'|trans }}</span>
  71.         </div>
  72.     {% else %}
  73.         <div class="ec-price">
  74.             価格:<span class="spanPrice ec-price__price price02-default">¥{{ Product.getPrice02IncTaxMin|number_format }}~
  75.             {# {{ Product.getPrice02IncTaxMax|price }} #}
  76.         </span>
  77.         <span class="ec-price__tax">{{ '(税込)'|trans }}</span>
  78.     </div>
  79. {% endif %}
  80. {#                         {% else %}
  81. <div class="ec-price">
  82. 価格:<span class="spanPrice ec-price__price">{{ Product.getPrice02IncTaxMin|number_format }}円</span>
  83. <span class="ec-price__tax">{{ '税込'|trans }}</span>
  84. </div>
  85. {% endif %} #}
  86. </div>
  87. {% endif %}