vendor/store.shopware.com/netinextmodal/src/Resources/views/storefront/component/neti-modal/body-script.html.twig line 1

Open in your IDE?
  1. <script type="text/javascript">
  2.     window.neti_modal = {
  3.         controller: {
  4.             name: '{{ controllerName|default(neti_modal_controller_name) }}',
  5.             action: '{{ controllerAction|default(neti_modal_controller_action) }}'
  6.         },
  7.         urls: {
  8.             getBox: '{{ path('frontend.neti_next_modal.get_box') }}',
  9.             getSingleBox: '{{ path('frontend.neti_next_modal.get_single_box') }}',
  10.             shown: '{{ path('frontend.neti_next_modal.shown') }}',
  11.             confirm: '{{ path('frontend.neti_next_modal.confirm') }}',
  12.             getGroupedBox: '{{ path('frontend.neti_next_modal.get_grouped_box') }}'
  13.         },
  14.         language: {
  15.             id: '{{ context.salesChannel.languageId }}'
  16.         },
  17.         css: {
  18.             'animate.css': '{{ asset('bundles/netinextmodal/storefront/css/animate.min.css') }}'
  19.         }
  20.     };
  21.     {% if page.product is defined %}
  22.         {% set product = page.product %}
  23.         {% set categoryTree = product.categoryTree %}
  24.         window.neti_modal.product = {
  25.             id: '{{ product.id }}'
  26.         };
  27.         window.neti_modal.categoryTree = {{ categoryTree|json_encode|raw }};
  28.         window.neti_modal.navigationCategory = {
  29.             id: '{{ categoryTree|last }}'
  30.         };
  31.     {% else %}
  32.         window.neti_modal.categoryTree = {{ neti_modal_category.tree|json_encode|raw }};
  33.         window.neti_modal.navigationCategory = {
  34.             id: '{{ neti_modal_category.id }}'
  35.         };
  36.     {% endif %}
  37.     {% if neti_modal_id is defined and neti_modal_id is not empty %}
  38.         window.neti_modal.box = {
  39.             id: '{{ neti_modal_id }}'
  40.         };
  41.     {% endif %}
  42. </script>