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

Open in your IDE?
  1. {% from 'utils.html.twig' import ico %}
  2. {% if isModuleActive('product_coupon_module') %}
  3.     {# SEE COUPONS #}
  4.     {% if productOfferCouponTotal > 0 %}
  5.         <div class="avaliable-coupons js--open-modal-coupons-product" data-url="{{ path('listCouponByProductOffers', { productOfferId: productOffer.id }) }}">
  6.             <span class="ico" for="product-coupom">{{ ico('ticket') }}</span>
  7.             <span class="txt">
  8.                 {{ getLanguage('avaliable_coupons', 'product') }}
  9.             </span>
  10.         </div>
  11.     {% endif %}
  12.     {# INSERT COUPON #}
  13.     <div class="coupon js--coupom{{ couponKey is not null ? ' status--aberto' }}">
  14.         <div class="add-coupom js--abre">
  15.             <span class="ico">{{ ico('ticket') }}</span>
  16.             <span>{{ getLanguage('add_coupon', 'product') }}</span>
  17.         </div>
  18.         <div class="input-wrap js--sub">
  19.             <div class="input-coupom">
  20.                 <label class="ico" for="product-coupom">{{ ico('ticket') }}</label>
  21.                 <input type="text" name="product-coupom" placeholder="{{ getLanguage('insert_code', 'product') }}">
  22.             </div>
  23.             <button>{{ getLanguage('apply', 'product') }}</button>
  24.         </div>
  25.         {# COUPON IF INVALID #}
  26.         {% if couponKey is not null %}
  27.             {% if not couponKeyValid %}
  28.                 <div class="coupon-warning">
  29.                     <p>
  30.                         {{ getLanguage('coupon_code', 'product') }} 
  31.                         <strong>{{ couponKey  }}</strong> 
  32.                         {{ getLanguage('is_invalid', 'product') }}.
  33.                     </p>
  34.                 </div>
  35.             {% else %}
  36.                 <div class="coupon-success">
  37.                     <p>
  38.                         {{ getLanguage('coupon_code', 'product') }} 
  39.                         <strong>{{ couponKey  }}</strong>
  40.                         {{ getLanguage('successfully_applied', 'product') }}.
  41.                     </p>
  42.                 </div>
  43.             {% endif %}
  44.         {% endif %}
  45.     </div>        
  46. {% endif %}