<script type="text/javascript">
window.neti_modal = {
controller: {
name: '{{ controllerName|default(neti_modal_controller_name) }}',
action: '{{ controllerAction|default(neti_modal_controller_action) }}'
},
urls: {
getBox: '{{ path('frontend.neti_next_modal.get_box') }}',
getSingleBox: '{{ path('frontend.neti_next_modal.get_single_box') }}',
shown: '{{ path('frontend.neti_next_modal.shown') }}',
confirm: '{{ path('frontend.neti_next_modal.confirm') }}',
getGroupedBox: '{{ path('frontend.neti_next_modal.get_grouped_box') }}'
},
language: {
id: '{{ context.salesChannel.languageId }}'
},
css: {
'animate.css': '{{ asset('bundles/netinextmodal/storefront/css/animate.min.css') }}'
}
};
{% if page.product is defined %}
{% set product = page.product %}
{% set categoryTree = product.categoryTree %}
window.neti_modal.product = {
id: '{{ product.id }}'
};
window.neti_modal.categoryTree = {{ categoryTree|json_encode|raw }};
window.neti_modal.navigationCategory = {
id: '{{ categoryTree|last }}'
};
{% else %}
window.neti_modal.categoryTree = {{ neti_modal_category.tree|json_encode|raw }};
window.neti_modal.navigationCategory = {
id: '{{ neti_modal_category.id }}'
};
{% endif %}
{% if neti_modal_id is defined and neti_modal_id is not empty %}
window.neti_modal.box = {
id: '{{ neti_modal_id }}'
};
{% endif %}
</script>