custom/apps/DmitsBruttoNetto/Resources/views/storefront/layout/header/actions/cart-widget.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/header/actions/cart-widget.html.twig' %}
  2. {% block layout_header_actions_cart_widget %}
  3.     {% set selectedPriceState=app.request.cookies.get('dmits-bruttonetto-cookie-value') %}
  4.     {% if (selectedPriceState=='') and (app.request.get('showprice'))%}
  5.         {% set selectedPriceState=app.request.get('showprice')%}
  6.     {% endif %}
  7.     {% if (selectedPriceState=='') and (app.session.get('dmits-bruttonetto-selectedPriceState'))%}
  8.         {% set selectedPriceState=app.session.get('dmits-bruttonetto-selectedPriceState')%}
  9.     {% endif %}
  10.     <span class="header-cart-icon">
  11.         {% sw_icon 'bag' %}
  12.     </span>
  13.     {% if page.cart.lineItems|length > 0 %}
  14.         <span class="badge badge-primary header-cart-badge">{{ page.cart.lineItems|length }}</span>
  15.     {% endif %}
  16.     <span class="header-cart-total">
  17.        {% if ((selectedPriceState==context.taxState) or (selectedPriceState=='') or (app.session.get('dmits-bruttonetto-page')=='checkout')) %}
  18.             {{ page.cart.price.positionPrice|currency }}
  19.         {% elseif selectedPriceState=='net' %}
  20.             {{ page.cart.price.netPrice|currency }}
  21.         {% else %}
  22.             {{ page.cart.price.totalPrice|currency }}
  23.         {%  endif %}{{ "general.star"|trans|sw_sanitize }}
  24.     </span>
  25. {% endblock %}