templates/frontend/cart/cart.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% trans_default_domain 'store' %}
  3. {% block facebook %}
  4.     {{ parent() }}
  5.     <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
  6. {% endblock %}
  7. {% block stylesheets %}
  8.     {{ parent() }}
  9.     <style>
  10.         .table td, .table th {
  11.             vertical-align: middle!important;
  12.             padding-left:5px!important;
  13.         }
  14.         @media screen and (min-width: 769px) and (max-width:1024px) {
  15.             .column.is-9 {
  16.                 width:70% !important;
  17.             }
  18.         }
  19.         .custom-radio-wrapper{
  20.             display:flex;
  21.             align-items:flex-start;          /* keeps radio button and text aligned */
  22.             border-radius:4px;
  23.             cursor:pointer;
  24.         }
  25.         .custom-radio-wrapper .custom-radio-container{
  26.             display:flex;
  27.             align-items:flex-start;
  28.         }
  29.         /* title line */
  30.         .payment-title{
  31.             font-size:1rem;                  /* ~16 px */
  32.             font-weight:500;
  33.             line-height:1.3;
  34.             display:block;
  35.         }
  36.         /* extra info line */
  37.         .payment-desc{
  38.             font-size:.8125rem;              /* ~13 px */
  39.             color:#666;
  40.             line-height:1.25;
  41.             display:block;                   /* forces a new line */
  42.             margin-top:.125rem;
  43.         }
  44.     </style>
  45. {% endblock %}
  46. {% block javascripts %}
  47.     {{ parent() }}
  48.     <script>
  49.         $(document ).ready(function() {
  50.             function colorize(element, className) {
  51.                 console.log('colorize');
  52.                 $("."+className+" tbody tr").each(function(){
  53.                     console.log($(this));
  54.                     $(this).css('border', '1px solid #dbdbdb');
  55.                 });
  56.                 $("."+className+" tbody tr").css('border', '1px solid #dbdbdb');
  57.                 element.closest('tr').css('border', '2px solid #44bc42');
  58.             }
  59.             /* Change quantity of the ordered product */
  60.             $(document).on('input', '.quantity-input', function (e) {
  61.                 var product = $(this).attr('data-product');
  62.                 var url = $('#update_quantity_cart').val();
  63.                 var record = $(this).attr('data-record');
  64.                 var quantity = $(this).val();
  65.                 $('#quantity_loader_'+product).show();
  66.                 $.ajax({
  67.                     url: url,
  68.                     type:"POST",
  69.                     data:{'record_id':record, 'quantity':quantity, 'product_id':product},
  70.                     success:function (data) {
  71.                         console.log(data);
  72.                         if (parseInt(data.error) === 1) {
  73.                             $('.cart-error-notification').show();
  74.                             $('.cart-error-notification').html(data.message);
  75.                             $("html, body").animate({ scrollTop: $('.cart-error-notification').offset().top }, 200);
  76.                         }
  77.                         $('.loader_group').hide();
  78.                         var cartUrl = $('#cart_url').val();
  79.                         $('#cart-table').load(cartUrl+' #cart-table', {}, function(response) {
  80.                             calculateSum();
  81.                         });
  82.                     }
  83.                 });
  84.             });
  85.             /* Trigger click of first element id delivery list */
  86.             $("input:radio[name=deliveryMethod]:first").trigger("click");
  87.             colorize($("input:radio[name=deliveryMethod]:first"), 'delivery-methods-table');
  88.             var $deliveryMethodContent = $('#deliveryMethodsContent');
  89.             var $paymentMethodContainer = $('#paymentMethodsContent');
  90.             var loadPaymentMethods = function() {
  91.                 var id = $('.deliveryMethod').val();
  92.                 $paymentMethodContainer.html(' ');
  93.                 var url = $('#load_payment_methods').val();
  94.                 $paymentMethodContainer.load(url, {'id':id}, function() {
  95.                     calculateSum();
  96.                 });
  97.             }
  98.             loadPaymentMethods();
  99.             /* Removes element from cart */
  100.             $(document).on('click', '.btn-cart-remove', 'click', function (e) {
  101.                 var url = $('#remove_cart_url').val();
  102.                 var record = $(this).attr('data-record');
  103.                 var product = $(this).attr('data-product');
  104.                 var productId = $(this).attr('data-id');
  105.                 $('#quantity_loader_'+product).show();
  106.                 $.ajax({
  107.                     url: url,
  108.                     type:"POST",
  109.                     data:{'record_id':record, 'product_id':product},
  110.                     success:function (data) {
  111.                         console.log(data);
  112.                         $('.loader_group').hide();
  113.                         var cartUrl = $('#cart_url').val();
  114.                         $('.cart-products').load(cartUrl+' .cart-products', {}, function(response) {
  115.                             console.log(response);
  116.                         });
  117.                         calculateSum();
  118.                     }
  119.                 });
  120.             });
  121.             /** Change country -> release load form od delviery */
  122.             $(document).on('change', '#country', function (e) {
  123.                 $deliveryMethodContent.html(' ');
  124.                 $paymentMethodContainer.html(' ');
  125.                 $('#country_id').val($(this).val());
  126.                 var url = $('#load_delivery_methods').val();
  127.                 $deliveryMethodContent.load(url, {'id':$(this).val()}, function() {
  128.                     $("input:radio[name=deliveryMethod]:first").trigger("click");
  129.                 });
  130.             });
  131.             /** Load payment methods */
  132.             $(document).on('change', '.deliveryMethod', function (e) {
  133.                 colorize($(this), 'delivery-methods-table');
  134.                 loadPaymentMethods();
  135.             });
  136.             /**
  137.              * Dynamically calculate total sum of product and dlivery + payment method
  138.              */
  139.             var calculateSum = function () {
  140.                 var deliveryId = $('input[name=deliveryMethod]:checked').val();
  141.                 var paymentId = $('input[name=paymentMethod]:checked').val();
  142.                 var url = $('#ajax_calculate_sum').val();
  143.                 $.ajax({
  144.                     url: url,
  145.                     type:"POST",
  146.                     data:{'deliveryId':deliveryId, 'paymentId':paymentId},
  147.                     success:function (data) {
  148.                         console.log(data);
  149.                         $('.totalSum').html(data.sum);
  150.                         if ($('.totalSumWithRebate').length) {
  151.                             $('.totalSumWithRebate').html(data.sumWithRebate);
  152.                         }
  153.                         if ($('.totalSumWithoutRebate').length) {
  154.                             $('.totalSumWithoutRebate').html(data.sum);
  155.                         }
  156.                         if ($('.savingsInfo').length) {
  157.                             $('.savingsInfo').html(data.savings);
  158.                         }
  159.                     }
  160.                 });
  161.             }
  162.             /** Handle payment method change */
  163.             $(document).on('click', '.paymentMethod', function (e) {
  164.                 colorize($(this), 'payment-methods-table');
  165.             });
  166.             $(document).on('click', '.deliveryMethod', function (e) {
  167.                 colorize($(this), 'delivery-methods-table');
  168.             });
  169.             $(document).on('change', '.paymentMethod', function (e) {
  170.                 colorize($(this), 'payment-methods-table');
  171.                 calculateSum();
  172.             });
  173.             $(document).on("click", "#go-to-request-form", "click", function() {
  174.                 var urlRedirect = $('#send_request_url').val();
  175.                 window.location.href = urlRedirect;
  176.             });
  177.             $(document).on('click', '.go-to-checkout', 'click', function (e) {
  178.                 e.preventDefault();
  179.                 var deliveryId = $('input[name=deliveryMethod]:checked').val();
  180.                 var paymentId = $('input[name=paymentMethod]:checked').val();
  181.                 if (deliveryId && paymentId) {
  182.                     var url = $('#ajax_save_cart').val();
  183.                     $.ajax({
  184.                         url: url,
  185.                         type:"POST",
  186.                         data:{'deliveryId':deliveryId, 'paymentId':paymentId},
  187.                         success:function (data) {
  188.                             window.location.href = $('#checkout_redirect').val();
  189.                         }
  190.                     });
  191.                 } else {
  192.                     $("#modal-choose-delivery").addClass("is-active");
  193.                 }
  194.             });
  195.         });
  196.         $('.modal-close').click(function() {
  197.             $("#modal-choose-delivery").removeClass("is-active");
  198.         });
  199.         $('.close-modal-custom').click(function() {
  200.             $("#modal-choose-delivery").removeClass("is-active");
  201.         });
  202.     </script>
  203. {% endblock %}
  204. {% block content %}
  205.     {% set countCriteoProducts = 0 %}
  206.     {% set criteoIds = [] %}
  207.     {% for product in cartProducts %}
  208.         {% set criteoIds = criteoIds|merge([product.id]) %}
  209.         {% set countCriteoProducts = countCriteoProducts + 1 %}
  210.     {% endfor %}
  211.     <input type="hidden" id="load_delivery_methods" value="{{ path('load_delivery_methods') }}"/>
  212.     <input type="hidden" id="load_payment_methods" value="{{ path('load_payment_methods') }}"/>
  213.     <input type="hidden" id="ajax_calculate_sum" value="{{ path('ajax_calculate_sum') }}"/>
  214.     <input type="hidden" id="ajax_save_cart" value="{{ path('ajax_save_cart') }}"/>
  215.     <input type="hidden" id="send_request_url" value="{{ path('send_request') }}"/>
  216.     {% if app.user.id is defined %}
  217.         {% if app.user.hasRole('ROLE_CUSTOMER_REGISTERED') %}
  218.             <input type="hidden" id="checkout_redirect" value="{{ path('register') }}"/>
  219.         {% else %}
  220.             <input type="hidden" id="checkout_redirect" value="{{ path('summary') }}"/>
  221.         {% endif %}
  222.     {% else %}
  223.         <input type="hidden" id="checkout_redirect" value="{{ path('register_login') }}"/>
  224.     {% endif %}
  225.     <input type="hidden" id="cart_url" value="{{ path('cart') }}"/>
  226.     <input type="hidden" id="remove_cart_url" value="{{ path('remove_from_cart') }}"/>
  227.     <input type="hidden" id="update_quantity_cart" value="{{ path('update_quantity_cart') }}"/>
  228.     {% if cartProducts|length > 0 %}
  229.         <div class="row" style="margin-top:20px;">
  230.             <div class="col-sm-12">
  231.                 <section id="content" role="main">
  232.                     <div class="container">
  233.                         <div class="row">
  234.                             <div class="">
  235.                                 {% if showNotification %}
  236.                                     <div class="notification is-danger cart-error-notification" style="text-align: center!important; margin:40px; display: block!important;">
  237.                                         {{ 'products_deleted_info'|trans }}
  238.                                     </div>
  239.                                 {% endif %}
  240.                                 <div class="notification is-danger cart-error-notification" style="text-align: center; display: none">
  241.                                 </div>
  242.                                {{ form_errors(form) }}
  243.                                {{ form_start(form, {'attr': {'id':'cart-form', 'method':'post', 'role':'form', 'novalidate': 'novalidate'}}) }}
  244.                                 <!-- START OF INFOGRAPHIC SECTION -->
  245.                                 <section class="section is-hidden-touch">
  246.                                     <div class="container">
  247.                                         <div class="columns is-center is-centered">
  248.                                             <div class="column column-cart is-one-third">
  249.                                                 <div style="display: inline-block;">
  250.                                                     <div class="step_nr_new active">
  251.                                                         <i class="fa fa-check"></i>
  252.                                                     </div>
  253.                                                 </div>
  254.                                                 <div class="column is-narrow" style="display: inline-block">
  255.                                                     <div class="step_txt active">
  256.                                                         {{ 'cart'|trans }}
  257.                                                     </div>
  258.                                                     <div class="" style="width: 200px;">
  259.                                                         <hr class="cart-hr-active">
  260.                                                     </div>
  261.                                                 </div>
  262.                                             </div>
  263.                                             <div class="column column-cart is-one-third column-back">
  264.                                                 <div style="display: inline-block;">
  265.                                                     <div class="step_nr_new">
  266.                                                     </div>
  267.                                                 </div>
  268.                                                 <div class="column is-narrow" style="display: inline-block">
  269.                                                     <div class="step_txt">
  270.                                                         {{ 'shipping_data'|trans }}
  271.                                                     </div>
  272.                                                     <div class="" style="width: 200px;">
  273.                                                         <hr class="cart-hr">
  274.                                                     </div>
  275.                                                 </div>
  276.                                             </div>
  277.                                             <div class="column column-cart is-one-third column-back">
  278.                                                 <div style="display: inline-block;">
  279.                                                     <div class="step_nr_new">
  280.                                                     </div>
  281.                                                 </div>
  282.                                                 <div class="column is-narrow" style="display: inline-block">
  283.                                                     <div class="step_txt">
  284.                                                         {{ 'summary'|trans }}
  285.                                                     </div>
  286.                                                     <div class="" style="width: 200px;">
  287.                                                         <hr class="cart-hr">
  288.                                                     </div>
  289.                                                 </div>
  290.                                             </div>
  291.                                         </div>
  292.                                     </div>
  293.                                 </section>
  294.                                 {% include 'frontend/components/notification.html.twig' %}
  295.                                 {% set total = 0 %}
  296.                                 {% set quantityTotal = 0 %}
  297.                                 {% set mainCategory = 0 %}
  298.                                 {% for product in form.products %}
  299.                                     {% set productEntity = product.product.vars.data %}
  300.                                     {% set subProduct = product.subProduct.vars.data %}
  301.                                     {% set subId = null %}
  302.                                     {% if subProduct %}
  303.                                         {% set subId = subProduct.id %}
  304.                                     {% endif %}
  305.                                     {% if mainCategory.id is not defined %}
  306.                                         {% set mainCategory = productEntity.mainCategory %}
  307.                                     {% endif %}
  308.                                     {% set subtotal = product.vars.value.getSubtotal %}
  309.                                     {% set total = total + subtotal %}
  310.                                 {% endfor %}
  311.                                 <div class="columns">
  312.                                     <div class="column is-9">
  313.                                         <h1 class="cart-right-side">
  314.                                             {{ 'cart'|trans }}
  315.                                         </h1>
  316.                                         <br/>
  317.                                         <table class="table is-fullwidth cart-products">
  318.                                             <tbody>
  319.                                             {% for product in form.products %}
  320.                                                 {% set productEntity = product.product.vars.data %}
  321.                                                 {% set subProduct = product.subProduct.vars.data %}
  322.                                                 {% set subId = null %}
  323.                                                 {% if subProduct %}
  324.                                                     {% set subId = subProduct.id %}
  325.                                                 {% endif %}
  326.                                                 <tr>
  327.                                                     <td valign="middle">
  328.                                                         <a href="{{ path('product', {'sub':subId, 'id':productEntity.id, 'slug':productEntity.slug}) }}">
  329.                                                             {% set mainPhoto = productEntity.getMainPhotoPath(app.request.locale) %}
  330.                                                             {% if subProduct and subProduct.imageName %}
  331.                                                                 {% set mainPhoto = '/images/product/'~subProduct.imageName %}
  332.                                                             {% endif %}
  333.                                                             <img style="min-width: 50px;!important; margin-top:20px; margin-bottom: 20px;" src="{{ asset(mainPhoto) | imagine_filter('smallCartProductCk2') }}" alt="{{ productEntity.name }}" class="product-image">
  334.                                                         </a>
  335.                                                     </td>
  336.                                                     <td class="product-price-col" valign="middle" style="width: 50%;">
  337.                                                         <div style="display: none">
  338.                                                             {{ form_row(product.product, {attr: {'class':'form-control', 'label': false}}) }}
  339.                                                             {{ form_row(product.subProduct, {attr: {'class':'form-control', 'label': false}}) }}
  340.                                                         </div>
  341.                                                         <span class="product-price-special">
  342.                                                        <a href="{{ path('product', {'sub':subId, 'id':productEntity.id, 'slug':productEntity.slug}) }}" style="font-weight: 600;" class="product-title-cart">
  343.                                                            {% if subProduct %}
  344.                                                                {{ subProduct.name }}
  345.                                                            {% else %}
  346.                                                                {{ productEntity.name }}
  347.                                                            {% endif %}
  348.                                                        </a>
  349.                                                        <br/>
  350.                                                        {% for cartProductEquipment in product.vars.value.equipments %}
  351.                                                            <span style="font-size:12px">
  352.                                                                {{ cartProductEquipment.equipment.name }} <strong>+{{ cartProductEquipment.equipment.price|formatPrice(currency) }}</strong><br/>
  353.                                                            </span>
  354.                                                        {% endfor %}
  355.                                                         {% if productEntity.shippingCategory and app.request.locale == 'pl' %}
  356.                                                             {% set sc = productEntity.shippingCategory~'_store' %}
  357.                                                             <a target="_blank" href="{{ path('single_article', {'id':shoppingArticle.id, 'slug':shoppingArticle.slug}) }}">
  358.                                                                 <div style="margin-top:10px; font-weight: normal; text-align: left; font-size: 14px;" class="step_txt">
  359.                                                                     {{ sc|trans }}
  360.                                                                 </div>
  361.                                                             </a>
  362.                                                         {% endif %}
  363.                                                    </span>
  364.                                                         <div style="{% if product.vars.value.parameterValues|length %}margin-top:20px;{% endif %} font-size:13px;">
  365.                                                             <div style="display: none">
  366.                                                                 {% do product.variant.setRendered %}
  367.                                                             </div>
  368.                                                             <div>
  369.                                                                 {% for value in product.vars.value.parameterValues %}
  370.                                                                     <strong>{{ value.parameter.name }}</strong>: {{ value.parameterValue.name }}<br/>
  371.                                                                 {% endfor %}
  372.                                                             </div>
  373.                                                         </div>
  374.                                                     </td>
  375.                                                     <td>
  376.                                                         <div class="custom-quantity-input">
  377.                                                             {{ form_row(product.quantity, {attr: {'class':'input quantity-input commaReplacer', 'data-record':product.vars.value.id, 'data-product':productEntity.id, 'label': false}}) }}
  378.                                                             {% set quantityTotal = quantityTotal + product.quantity.vars.value %}
  379.                                                         </div>
  380.                                                         <div class="loader_group" style="text-align: center; margin-top:20px; margin-left:-8px; display: none" id="quantity_loader_{{ productEntity.id }}">
  381.                                                             <i class="fas fa-spinner fa-spin"></i>
  382.                                                         </div>
  383.                                                     </td>
  384.                                                    <td class="product-price-col" style="min-width: 110px;">
  385.                                                        <span class="product-price-special">
  386.                                                            {% if mainCategory.id is not defined %}
  387.                                                                {% set mainCategory = productEntity.mainCategory %}
  388.                                                            {% endif %}
  389.                                                            {{ form_row(product.price, {attr: {'class':'form-control', 'label': false}}) }}
  390.                                                            <div style="display: none">
  391.                                                                {{ form_row(product.currency, {attr: {'class':'form-control', 'label': false}}) }}
  392.                                                            </div>
  393.                                                            {% set currency = product.currency.vars.data %}
  394.                                                        </span>
  395.                                                        {% set subtotal = product.vars.value.getSubtotal %}
  396.                                                        <span style="font-size:24px; font-weight: bold;">
  397.                                                            {{ subtotal|formatPrice(currency) }}
  398.                                                        </span>
  399.                                                     </td>
  400.                                                     <td style="width:60px;">
  401.                                                         <a style="cursor: pointer; font-size:24px; font-weight: normal;" class="close-button btn-cart-remove" data-record="{{ product.vars.value.id }}" data-product="{{ productEntity.id }}"><i class="fa fa-times"></i> </a>
  402.                                                     </td>
  403.                                                 </tr>
  404.                                             {% endfor %}
  405.                                             {% do form.products.setRendered %}
  406.                                             </tbody>
  407.                                         </table>
  408.                                         <div class="columns">
  409.                                             <div class="column is-12">
  410.                                                 <h1 class="cart-right-side move-right-desktop">
  411.                                                     {{ 'choose_delivery'|trans }}
  412.                                                 </h1>
  413.                                             </div>
  414.                                         </div>
  415.                                         <div class="columns">
  416.                                             <div class="column is-12">
  417.                                                 <div id="deliveryMethodsContent">
  418.                                                     {% include 'frontend/cart/_deliveryMethods.html.twig' %}
  419.                                                 </div>
  420.                                             </div>
  421.                                         </div>
  422.                                         <div class="columns">
  423.                                             <div class="column is-12">
  424.                                                 <div class="columns">
  425.                                                     <div class="column is-9">
  426.                                                         <h1 class="cart-right-side move-right-desktop">
  427.                                                             {{ 'choose_payment'|trans({}, 'store') }}
  428.                                                         </h1>
  429.                                                     </div>
  430.                                                 </div>
  431.                                                 <div id="paymentMethodsContent">
  432.                                                 </div>
  433.                                             </div>
  434.                                         </div>
  435.                                     </div>
  436.                                     {% include 'frontend/components/_cartRightSide.twig' with {'disableActions':false} %}
  437.                                 </div>
  438.                                 <div class="columns" style="margin-left:-10px; margin-bottom: 30px;">
  439.                                     <div class="column is-full">
  440.                                         <a href="{{ path('category', {'slug':mainCategory.slug, 'id':mainCategory.id}) }}" style="font-weight: 500;" class="button add-another-product-button button-back is-warning"><i class="fa fa-arrow-left"></i> &nbsp;  {{ 'add_another_products'|trans }}</a>
  441.                                     </div>
  442.                                 </div>
  443.                                 {% do form.paymentMethod.setRendered %}
  444.                                 {% do form.deliveryCountry.setRendered %}
  445.                                 {% do form.deliveryMethod.setRendered %}
  446.                                 {{ form_end(form) }}
  447.                             </div>
  448.                         </div>
  449.                         {% if crossSelling|length %}
  450.                             <h1 class="cart-right-side" style="margin-bottom: 30px;">
  451.                                 {{ 'others_bought_also'|trans }}
  452.                             </h1>
  453.                             <div class="columns is-multiline is-mobile lista-produktow" v-match-heights="{ el: [ '.no-description' ] }">
  454.                                 {% if crossSelling == 0 %}
  455.                                 {% else %}
  456.                                     {% for productData in crossSelling|slice(0,4) %}
  457.                                         {% set product = productData[0] %}
  458.                                         {% include 'frontend/components/smallProduct.html.twig' with {'isOneQuarter':1, 'product':product, 'productData':productData} %}
  459.                                     {% endfor %}
  460.                                 {% endif %}
  461.                             </div>
  462.                         {% endif %}
  463.                     </div>
  464.                 </section>
  465.             </div>
  466.         </div>
  467.     {% else %}
  468.         {% include 'frontend/components/notification.html.twig' %}
  469.         {% if showNotification %}
  470.             <div class="notification is-danger cart-error-notification" style="text-align: center!important; margin:40px; display: block!important;">
  471.                 {{ 'products_deleted_info'|trans }}
  472.             </div>
  473.         {% endif %}
  474.         <div class="review-comments" style="margin-top:30px; margin-bottom:30px; text-align: center">
  475.             <h1>
  476.                 {{ 'your_cart_is_empty'|trans }}
  477.             </h1>
  478.         </div>
  479.     {% endif %}
  480.     <div class="modal" id="modal-choose-delivery">
  481.         <div class="modal-background"></div>
  482.         <div class="modal-content">
  483.             <div class="box" style="padding:20px!important;">
  484.                 <p style="text-align: center">
  485.                     {{ 'please_choose_form_delivery_and_payment'|trans }}
  486.                     <br/>
  487.                     <button style="margin-top:20px;    color: #fff!important; border-color: transparent!important; font-weight: bold; font-size: 17px!important; background: #44bc42;" class="button close-modal-custom is-success">{{ 'ok_got_it'|trans }}</button>
  488.                 </p>
  489.             </div>
  490.         </div>
  491.         <button class="modal-close is-large" aria-label="close"></button>
  492.     </div>
  493.     {% set criteoCount = 0 %}
  494.     {% if app.request.locale == 'pl' %}
  495.         <script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
  496.         <script type="text/javascript">
  497.             window.criteo_q = window.criteo_q || [];
  498.             var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
  499.             window.criteo_q.push(
  500.                 { event: "setAccount", account: 36267 },
  501.                 { event: "setEmail", email: "{% if app.user.email is defined %} {{ app.user.email }} {% endif %}" },
  502.                 { event: "setSiteType", type: deviceType },
  503.                 { event: "viewBasket", item: [
  504.                             {% for item in cartProducts %}{% set criteoCount = criteoCount + 1 %}{% if criteoCount != countCriteoProducts %}{ id: "{{ item.product.id }}", price: {{ item.price }}, quantity: {{ item.quantity}} },{% else %}{ id: "{{ item.product.getId }}", price: {{ item.price }}, quantity: {{ item.quantity }} }{% endif %}{% endfor %}
  505.                     ]}
  506.             );
  507.         </script>
  508.         <script type="text/javascript">
  509.             var google_tag_params = {
  510.                 ecomm_pagetype: 'cart'
  511.             };
  512.         </script>
  513.     {% endif %}
  514. {% endblock %}