Show top of page when click next page

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 лет назад
Hi

When you have a lot of products on every page it´s not ideal when going to next page you start from the bottom, then you must scroll up before scrolling down the products.

So when going to next page it must show the page from top.
8 лет назад
Hi,
how did you solve this problem? Can you help me. I'm having same ...
Thanx Tom
8 лет назад
Maybe you're using a theme or plugin that implements ajax based paging since the demo site doesn't suffer from this issue: http://demo.nopcommerce.com/electronics
8 лет назад
Hi Pete, you are right! The error was in plugin. Thanx you for good idea! Tom
5 лет назад
I found this was happening because of the SevenSpikes AjaxFilters plugin.
The cure:
Find the Filters.min.js file in the Plugins/SevenSpikes.Nop.Plugins.AjaxFilters/Scripts/ directory.
Open in a text editor (notepad or something)
find the word "done" in the file

.done(function(t) {if ("" !== l && (C.changeViewModeOrderByAndPageSize(t),

after the first opening curly brackets, add "window.scrollTo(0, 0);"

.done(function(t) {
                window.scrollTo(0, 0);
                if ("" !== l && (C.changeViewModeOrderByAndPageSize(t),

Note: its a minimized file, the line breaks are my addition for clarity.
Save the file and refresh your page in your browser.
3 года назад
Thanks chrispetchey

I had same issue and the update you suggested worked (except that instead of adding window.scrollTo(0, 0); I had to add window.scrollTo(1, 1);
2 года назад
In version 4.40.4:
Check if you have the following setting enabled under Admin > Configuration > Settings > Catalog settings > Catalog pages section:
Use AJAX products loading

Alternatively, you can change it here:
Under Admin > Configuration > Settings > All settings (advanced).
If set to true, change to 'False' and save, it should resolve the issue if not related to a plugin.
catalogsettings.useajaxcatalogproductsloading

I can't say if the same is valid for older versions.
2 года назад
great, your solution saved me.

A little bit more background: I used Spike7 ajax filter but disabled it later after I edited Nop source code of searching products. This issue then came out.

avdveen wrote:
In version 4.40.4:
Check if you have the following setting enabled under Admin > Configuration > Settings > Catalog settings > Catalog pages section:
Use AJAX products loading

Alternatively, you can change it here:
Under Admin > Configuration > Settings > All settings (advanced).
If set to true, change to 'False' and save, it should resolve the issue if not related to a plugin.
catalogsettings.useajaxcatalogproductsloading

I can't say if the same is valid for older versions.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.