custom/apps/DmitsVatCheck/Resources/views/storefront/base.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/base.html.twig' %}
  2. {% block base_script_hmr_mode %}
  3.     {{ parent() }}
  4.     {% if controllerName|lower=='auth' or controllerName|lower=='accountprofile' or  controllerName|lower=='register' or  (config('DmitsVatCheck.config.active')==1 and controllerName|lower=='checkout') %}
  5.         <script>
  6.             var dmitsVatCheckRegister="{{config('DmitsVatCheck.config.blockregister')}}";
  7.             var dmitsVatCheckOrder="{{config('DmitsVatCheck.config.blockorder')}}";     
  8.             var dmitsVatCheckAlwaysVatId="{{config('DmitsVatCheck.config.alwaysvatid')}}";    
  9.             
  10.             {% if controllerName|lower=='checkout'%}
  11.                 var dmitsVatCheckCustomerVatIds="{{context.customer.vatIds|join(',')}}";  
  12.                 var dmitsVatCheckCustomerAccountType="{% if context.customer.company is empty %}0{% else %}1{% endif %}";    
  13.             {% endif %}
  14.             
  15.             var dmitsVatCheckShopid="{{appShopId}}";
  16.             var dmitsVatCheckErrorVatId="{{"dmits.vatcheck.error.vatid"|trans}}";
  17.             var dmitsVatCheckErrorVatIdForm="{{"dmits.vatcheck.error.vatidform"|trans|raw|escape}}";
  18.             var dmitsVatCheckErrorOrderError="{{"dmits.vatcheck.error.ordererror"|trans|raw|escape}}";
  19.         </script>
  20.     {% endif %}
  21.     
  22.     <script>
  23.     var dmitsVatCheckPage="{{controllerName|lower}}";
  24.     var dmitsVatCheckActive="{{config('DmitsVatCheck.config.active')}}";  
  25.     </script>
  26. {% endblock %}