diff --git a/view/frontend/layout/tweakwise_ajax_category.xml b/view/frontend/layout/tweakwise_ajax_category.xml index e6f51485..098770d0 100644 --- a/view/frontend/layout/tweakwise_ajax_category.xml +++ b/view/frontend/layout/tweakwise_ajax_category.xml @@ -9,6 +9,7 @@ --> + diff --git a/view/frontend/layout/tweakwise_ajax_search.xml b/view/frontend/layout/tweakwise_ajax_search.xml index 2c30ed16..85e7c546 100644 --- a/view/frontend/layout/tweakwise_ajax_search.xml +++ b/view/frontend/layout/tweakwise_ajax_search.xml @@ -9,6 +9,7 @@ --> + diff --git a/view/frontend/web/js/navigation-form.js b/view/frontend/web/js/navigation-form.js index 0e6cad9c..10e85ed2 100644 --- a/view/frontend/web/js/navigation-form.js +++ b/view/frontend/web/js/navigation-form.js @@ -266,9 +266,16 @@ define([ .replaceWith(newToolbarFirst.outerHTML); } if (newToolbarLast) { + var scripts = ''; + $(newToolbarLast).siblings('script[type="text/x-magento-init"]').map( + function (index, element) { + scripts += element.outerHTML; + } + ); + toolbar .last() - .replaceWith(newToolbarLast.outerHTML); + .replaceWith(newToolbarLast.outerHTML + scripts); } $('body').trigger('contentUpdated');