templates/website/product/product-detail-pricing.html.twig line 1

Open in your IDE?
  1. {% set infoCycle = installmentPeriodText(productOffer.planCycle) %}
  2. {% if product.type == enum('ProductEnum::SUBSCRIPTION') %}
  3.     <div class="period">
  4.         <span>{{ infoCycle.textPlan|title }}</span>
  5.     </div>
  6. {% endif %}
  7. {% if productOffer.notForSale == enum('ProductEnum::NO') and (infoOffer.allowBuyNow or infoOffer.saleChannelOption) and not infoOffer.userHasProduct %}
  8.     <div class="pricing">
  9.         {% if parcelInfo is defined and parcelInfo.maxInstallments > 1  %}
  10.             <p class="preco-atual">
  11.                 <small>{{ parcelInfo.maxInstallments }}x {{ productOffer.currencySymbol }}</small> 
  12.                 {{ parcelInfo.parcelPrice|number_format(2, ',', '.') }}
  13.             </p>
  14.         {% else %}
  15.             <p class="final">
  16.                 {{ infoOffer.isFree?
  17.                     getLanguage('free', 'product'):
  18.                     "#{productOffer.currencySymbol} #{productOffer.getPriceRealCopy()|number_format(2, ',', '.')}"
  19.                 }}
  20.             </p>
  21.         {% endif %}
  22.         
  23.         <p>
  24.             {% if productOffer.priceDisplay > productOffer.getPriceRealCopy() %}
  25.                 <span class="display-price">
  26.                     {{ getLanguage('was', 'product') }} 
  27.                     <span class="scratch">
  28.                         {{ productOffer.currencySymbol }} {{ productOffer.priceDisplay|number_format(2, ',', '.') }}
  29.                     </span>
  30.                 </span>
  31.             {% elseif productOffer.priceReal > productOffer.getPriceRealCopy() %}
  32.                 <span class="display-price">
  33.                     {{ getLanguage('was', 'product') }} 
  34.                     <span class="scratch">
  35.                         {{ productOffer.currencySymbol }} {{ productOffer.priceReal|number_format(2, ',', '.') }}
  36.                     </span>
  37.                 </span>
  38.             {% endif %}
  39.             {% if parcelInfo is defined and parcelInfo.maxInstallments > 1 %}
  40.                 <span class="display-price">
  41.                     {{ productOffer.currencySymbol }} {{ productOffer.getPriceRealCopy|number_format(2, ',', '.') }} {{ getLanguage('in_cash', 'product') }}
  42.                 </span>
  43.             {% endif %}
  44.             {% if product.type == enum('ProductEnum::SUBSCRIPTION') or productOffer.allowRecurrency == enum('ProductOfferEnum::YES') %}
  45.                 <span class="cycle">/{{ infoCycle.text }}</span>
  46.             {% endif %}
  47.             {% if (productOffer.planLifetime == 0 and productOffer.planChargeNumberMax > 1) %}
  48.                 <span class="payments">{{ "#{productOffer.planChargeNumberMax} #{getLanguage('payments', 'product')}" }}</span>
  49.             {% endif %}
  50.         </p>
  51.     </div>
  52. {% endif %}