From b7980d5f968e3019784eec917d01cd75d95fa112 Mon Sep 17 00:00:00 2001 From: Philippe Aellig Date: Mon, 31 May 2021 22:47:47 +0200 Subject: [PATCH] allow use with filtered navigation --- .gitignore | 1 + composer.json | 1 + view/frontend/templates/scripts.phtml | 2 +- view/frontend/web/js/script.js | 4 ++-- 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..61069b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.idea/* \ No newline at end of file diff --git a/composer.json b/composer.json index b527fba..3527f91 100644 --- a/composer.json +++ b/composer.json @@ -2,6 +2,7 @@ "name": "landofcoder/module-ajaxscroll", "description": "Freely Scroll down & See what page of the catalog they're on, Automatically loading, Similar technique as seen on Twitter, Facebook", "require": { + "php": "^7.4", "landofcoder/module-all" : "1.*" }, "keywords": [ diff --git a/view/frontend/templates/scripts.phtml b/view/frontend/templates/scripts.phtml index 61d90fe..173e691 100644 --- a/view/frontend/templates/scripts.phtml +++ b/view/frontend/templates/scripts.phtml @@ -230,7 +230,7 @@ var IASHistoryExtension = function (options) { // always take the last matching item var prev_url = jQuery(this.prevSelector, container).last().attr('href'); if(typeof(prev_url) != 'undefined') { - prev_url += '&ajaxscroll=1'; + prev_url += '?ajaxscroll=1'; } else { prev_url = ''; } diff --git a/view/frontend/web/js/script.js b/view/frontend/web/js/script.js index aa7ad8a..d57e5f7 100644 --- a/view/frontend/web/js/script.js +++ b/view/frontend/web/js/script.js @@ -317,7 +317,7 @@ define([ // always take the last matching item var next_url = $(this.nextSelector, container).last().attr('href'); if(typeof(next_url) != 'undefined') { - next_url += '&ajaxscroll=1'; + next_url += '?ajaxscroll=1'; } else { next_url = ''; } @@ -817,7 +817,7 @@ var IASHistoryExtension = function (options) { // always take the last matching item var prev_url = jQuery(this.prevSelector, container).last().attr('href'); if(typeof(prev_url) != 'undefined') { - prev_url += '&ajaxscroll=1'; + prev_url += '?ajaxscroll=1'; } else { prev_url = ''; }