<script data-reload="filter-script">
   {* @formatter:off *}
   var $filter = $('[data-filter="wrapper"]').data("wpjCategoryFilter");

   if ($filter) {

      $filter.setUrlAndTitle('{$body.results.products.pager->getUrl([]) nofilter}', {$view->getTitle()|json_encode nofilter});

      $filter.updateItemsState({


         {*'cena': {$body.dynamic_filter.filter->getPriceRange()|json_encode nofilter},*}
         {foreach $view->getFilters() as $id => $parameter}
            {$inputId = $parameter.name|strip_accent}
            '{$inputId}': { 'values': {$parameter.values|json_encode nofilter} },
         {/foreach}

         '': ''
      });
   }{* @formatter:on *}
</script>
