templates/website/product/product-detail-buy-section.html.twig line 1

Open in your IDE?
  1. {% from 'utils.html.twig' import ico, discountValue %}
  2. <section id="buy-info" class="buy-info">
  3.     <div class="container">
  4.         <div class="scroll" data-page-height-top="{{ productPage.showShortageControlTime ? '1':'0' }}">
  5.             <div class="box">
  6.                 <input type="hidden" name="product-id" value="{{ productOffer.product.id }}" />
  7.                 {# COVER #}
  8.                 {% include 'website/product/product-detail-cover.html.twig' with { mode:'desktop', img_option: 'product-photo-detail' }%}
  9.                 <div class="col">
  10.                     <div class="tags-wrap">
  11.                         {% if (scoreProduct.scoreTotal > 9) %}
  12.                             <a href="#sec-reviews">
  13.                                 <span class="avaliacao">
  14.                                     {% include 'website/includes/stars.html.twig' with { score: scoreProduct.score }%}
  15.                                     &thinsp;<span class="total">({{ scoreProduct.scoreTotal }})</span>
  16.                                 </span>
  17.                             </a>
  18.                         {% endif %}
  19.                     </div>
  20.                     {# PRICING #}
  21.                     {% include 'website/product/product-detail-pricing.html.twig' %}
  22.                     {% if saleLimitRemaining > 0 or productOffer.allowSaleLimit == enum('ProductOfferEnum::NO') %}
  23.                         {% if productOffer.getSaleIsOpen() %}
  24.                             {# FREE TRIAL #}
  25.                             {% if productOffer.allowTrial and not userHasProduct(productOffer.product, true) %}
  26.                                 <p class="trial">{{ getLanguage('free_access_by', 'product') }} <b>{{ productOffer.trialPeriod }} {{ getLanguage('days', 'product') }}</b></p>
  27.                             {% endif %}
  28.                             {# DISCOUNT AND COUNTDOWN #}
  29.                             {% include 'website/product/product-detail-discountdown.html.twig' %}
  30.                             {# SALE LIMIT #}
  31.                             {% if saleLimitRemaining == 1 %}
  32.                                 <p class="sale-limit"><b>{{ getLanguage('remains', 'product') }} 
  33.                                 {{ saleLimitRemaining }} {{ getLanguage('vacancy', 'product') }}</b></p>
  34.                             {% elseif saleLimitRemaining > 0 %}
  35.                                 <p class="sale-limit"><b>{{ getLanguage('remain', 'product') }} 
  36.                                 {{ saleLimitRemaining }} {{ getLanguage('vacancies', 'product') }}</b></p>
  37.                             {% endif %}
  38.                         {% endif %}
  39.                     {% endif %}
  40.                     <br>
  41.                     {# FEATURES #}
  42.                     {% include 'website/product/product-detail-features.html.twig' %}
  43.                 </div>
  44.                 <div class="actions">
  45.                     {% if productOffer.notForSale == enum('ProductEnum::NO') %}
  46.                         {# BUTTON BOX #}
  47.                         <div class="btn-box-product-detail" data-status="{{ isInCart ? '' : 'add' }}">
  48.                             {% include 'website/product/product-detail-actions-btn-box.html.twig' %}
  49.                         </div>
  50.                         {# INÍCIO OU FECHAMENTO DA VENDA #}
  51.                         {% include 'website/product/product-detail-installment-one.html.twig' %}
  52.                         {% if infoOffer.allowBuyNow and not infoOffer.userHasProduct and productPage.showModuleCoupon %}
  53.                             {# COUPOM #}
  54.                             <div class="coupom-product-detail section-coupom" data-status="{{ isInCart ? '' : 'on' }}">
  55.                                 {% include 'website/product/product-detail-coupom.html.twig' %}
  56.                             </div>
  57.                         {% endif %}
  58.                     {% else %}
  59.                         {% if  product.type == enum('ProductEnum::COURSE')
  60.                                and productOffersSubscriptionSection.items is not empty %}
  61.                             <div class="btn-box-product-detail" data-status="{{ isInCart ? '' : 'add' }}">
  62.                                 <a href="#section-plans" class="btn-buy">
  63.                                     {{ getLanguage('subscribe_now', 'product') }}
  64.                                 </a>
  65.                             </div>
  66.                         {% endif %}
  67.                     {% endif %}
  68.                 </div>
  69.                 {% if user and not infoOffer.userHasProduct %}
  70.                     {% include 'website/controls/btn-wishlist.html.twig' with {
  71.                         'wish_id':       product.id,
  72.                         'wish_offer_id': productOffer.id,
  73.                         'wish_title':    product.title,
  74.                         'wish_currency': productOffer.currencyCode,
  75.                         'wish_price':    productOffer.getPriceRealCopy(),
  76.                     }%}
  77.                 {% endif %}
  78.             </div>
  79.         </div>
  80.         {# SELO PREVENDA #}
  81.         {% if productOffer.preSale == enum('ProductEnum::YES') %}
  82.             <div class="presell">
  83.                 {{ ico('badge') }}
  84.                 <span>
  85.                     {{ getLanguage('pre', 'product')|upper }}
  86.                     <br>
  87.                     <small>{{ getLanguage('sale', 'product')|upper }}</small>
  88.                 </span>
  89.             </div>
  90.         {% endif %}
  91.     </div>
  92. </section>