templates/website/product/product-detail-actions-btn-box.html.twig line 1

Open in your IDE?
  1. {% from 'utils.html.twig' import ico, btnAddCart %}
  2. {# JÁ NO CARRINHO #}
  3. {% if isInCart and not infoOffer.userHasProduct and productOffer.getSaleIsOpen() %}
  4.     <a class="btn-go-cart" href="{{ path('cart') }}">
  5.         {{ getLanguage('go_cart', 'product') }}&nbsp;{{ ico('external-link') }}
  6.     </a>
  7. {% else %}
  8.     {# ADICIONAR AO CARRINHO #}
  9.     {% if 
  10.         not infoOffer.isFree and
  11.         not infoOffer.saleChannelOption and
  12.         infoOffer.allowBuyNow and
  13.         not infoOffer.userHasProduct and
  14.         emptyProductSuggestion
  15.     %}
  16.         <button class="btn-add btnAddCart"
  17.             data-offer-id="{{ productOffer.id }}"
  18.             data-offer-name="{{ productOffer.product.title }}"
  19.             data-offer-currency="{{ productOffer.currencyCode }}"
  20.             data-offer-value="{{ productOffer.getPriceRealCopy() }}"
  21.             data-offer-link="{{ path('cart') }}"
  22.             data-offer-link-class="btn-go-cart"
  23.             data-offer-link-text="{{ getLanguage('go_cart', 'product') }}"
  24.             requestLink="{{ 
  25.                 path('cartAdd', { 
  26.                     poID: productOffer.id,
  27.                     pcID: (productCoupon ? productCoupon.id : 0),
  28.                     isAjaxRequest: 1
  29.                 })
  30.             }}?{{ utmsUrl }}">
  31.             <div class="btn--cart">
  32.                 <span>{{ getLanguage('add_to_cart', 'product') }}</span>
  33.                 <span>{{ getLanguage('adding', 'product') }}&thinsp;&hellip;</span>
  34.             </div>
  35.             <i class="loader">{{ ico('loader-wish') }}</i>
  36.         </button>
  37.     {% endif %}
  38.     {# COMPRAR AGORA #}
  39.     {{
  40.         btnAddCart(
  41.         getLanguage(infoOffer.text, 'product'),
  42.         productOffer, 
  43.         infoOffer, 
  44.         'btn-buy',
  45.         '',
  46.         productCoupon,
  47.         false,
  48.         utmsUrl
  49.         )
  50.     }}
  51. {% endif %}
  52. {# <p>deu</p> #}
  53. {# @!!! #}