Jump to content

Block layered pagination problem


Recommended Posts

Hi,

 

I have a similar issue, I did manage to semi fix the SHOW ALL pagination problem using https://github.com/PrestaShop/PrestaShop/commit/ddfba4cd7d5589e85986a6617a672697119fbc89 however this only works on the first page, if you go to show all on the second page and click show all it just redirects to page 1.

 

Interestingly if you disable the "layered navigation" module then the pagination/show all issue works as intended (if using the fix on github).

It looks as though there are multiple issues with pagination and the layered navigation module.

Edited by cat1999 (see edit history)
Link to comment
Share on other sites

Could you post a link to your site so we can have a look at it ?

Usually when this happens it is a problem of missing indexes.

Go to Modules and look for the Layered Navigation module . Click Configure.

First you must create a template. So if you have no template Click the + button and create one. 

After you finish creating the template you must recreate the Indexes. So go back to the configuration page of your module and on the first section called "Indexes and Caches" you will find some links to recreate them.

 

Give it a try. Hope it helps.

 

Happy shopping . As always rate if you find useful.

Link to comment
Share on other sites

Same problem here!

 

 

Same  . Really need it . Only for this module i've updated my site ...and surprise ... it's not working good . :(

 

 

I sell shoes, I really need this module..

 

 

It's like "Dude , my car stoped working" and the other say "mine too" , "mine too" ... 

Post the links to your websites so we can have a look. Let your car(website) be seen by a mechanic

Link to comment
Share on other sites

 

Ok , so I've looked some more into this.

There is indeed a problem in between layered navigation and prestashop's pagination.

The layered navigation module adds a # after the category name and makes it's own pagination wich is no longer comaptible with some of the mothods from the original pagination.

Just try to delete the # from the address bar  and go to that address and you will see that it changes from 

http://www.reef-guardian.com/boutique/fr/18-test-de-l-eau#/availability-in_stock/weight-0.2-1

to

http://www.reef-guardian.com/boutique/fr/18-test-de-l-eau?selected_filters=availability-in_stock%2Fweight-0.2-1

 

after that everything will work. 

 

To be more precise in the Blocklayered.js you will find

function initLayered()
{
	initFilters();
	initSliders();
	initLocationChange();
	updateProductUrl();
	if (window.location.href.split('#').length == 2 && window.location.href.split('#')[1] != '')
	{
		var params = window.location.href.split('#')[1];
		reloadContent('&selected_filters='+params);
	}
}

I now understood what the problem is , and I will look for a solution.

 

 

Catch you soon.

Link to comment
Share on other sites

So the only solution I've found this far is to hide the SHOW ALL button.

From the theme's Pagination.TPL file

Just comment out the <form> tag.

Smarty comment syntax is :              {*  *}

Or hide it by css by adding this line at the end of GLOBAL.CSS file in your theme

.showall {display: none;}

The main point is that until a valid fix is released or found, this might come in handy.

Why ? Simply because by having a layered navigation module allows the users to narrow the displayed products so much that in the end they won't even need the "show all" button.

 

This is not a fix , just a temporary solution I've came up with, and used on my site as well.

If I will find a real solution I will post it here.

 

Have fun. Happy shopping.

Edited by George.Gall (see edit history)
Link to comment
Share on other sites

Ok , so I've looked some more into this.

There is indeed a problem in between layered navigation and prestashop's pagination.

The layered navigation module adds a # after the category name and makes it's own pagination wich is no longer comaptible with some of the mothods from the original pagination.

Just try to delete the # from the address bar  and go to that address and you will see that it changes from 

http://www.reef-guardian.com/boutique/fr/18-test-de-l-eau#/availability-in_stock/weight-0.2-1

to

http://www.reef-guardian.com/boutique/fr/18-test-de-l-eau?selected_filters=availability-in_stock%2Fweight-0.2-1

 

after that everything will work. 

 

To be more precise in the Blocklayered.js you will find

function initLayered()
{
	initFilters();
	initSliders();
	initLocationChange();
	updateProductUrl();
	if (window.location.href.split('#').length == 2 && window.location.href.split('#')[1] != '')
	{
		var params = window.location.href.split('#')[1];
		reloadContent('&selected_filters='+params);
	}
}

I now understood what the problem is , and I will look for a solution.

 

 

Catch you soon.

George.Gall , any solution for pagination ??

 

my site : www.sistems.ro .. and I have same problem like St055 .

If i have the Layered Navigation module on , when i click on a feature , my link became :

http://sistems.ro/12-calculatoare-second-hand-ieftine#/calctipcarcasa-tower/page-3

.. with " # " in it , and the pagination dissapear from bottom .  :(

Edited by PCsh.ro (see edit history)
  • Like 1
Link to comment
Share on other sites

The problem is that the basic category pagination "without layered enabled" url is http://localhost/root/index.php?id_category=20&controller=category&p=2   which work fine even with the navigation enabled. But when the navigation layered is enabled it gives that url =category#/page-2....... is someone finaly to help us just to change the url? where is the code and what we have to change?

Link to comment
Share on other sites

George.Gall , any solution for pagination ??

 

my site : www.sistems.ro .. and I have same problem like St055 .

If i have the Layered Navigation module on , when i click on a feature , my link became :

http://sistems.ro/12-calculatoare-second-hand-ieftine#/calctipcarcasa-tower/page-3

.. with " # " in it , and the pagination dissapear from bottom 

 

So the only solution I've found this far is to hide the SHOW ALL button.

From the theme's Pagination.TPL file

Just comment out the <form> tag.

Smarty comment syntax is :              {*  *}

Or hide it by css by adding this line at the end of GLOBAL.CSS file in your theme

.showall {display: none;}

The main point is that until a valid fix is released or found, this might come in handy.

Why ? Simply because by having a layered navigation module allows the users to narrow the displayed products so much that in the end they won't even need the "show all" button.

 

This is not a fix , just a temporary solution I've came up with, and used on my site as well.

If I will find a real solution I will post it here.

 

Have fun. Happy shopping.

I tried this and didn't fix the problem..... the only way is to disable tha layered navigation block pagination and let the system to use the prestashop pagination. How can we do this? it not only the # but this #/page-2 has to change to this category&p=2. Is there any idea?

Link to comment
Share on other sites

kipme thank you very much for the solution. It work for me. test it in different browsers because it didn't work for me on MF untill i delete the cashe. The only problem now is that....the second page does not start from the first products but from the top of the page. Is there any idea for this? i know it is much smaller problem but it will be good if someone help.

Link to comment
Share on other sites

Hi guys, 

 

I have also problem with blocklayered and pagination. When filter are being applied, first they don't work at all and after several attempts they do but the the number of products looks weird...

 

Also meta title is being shown in and below the category banner.

 

My site: http://gatogato.sk.data21.websupport.sk/ (still testing mode) and sp of the issue: http://awesomescreenshot.com/0f72tqlqdf

 

 

Do you have any suggestions or advice please? I tried to rebuild the index and cache but nothing seem to work.

 

 

Thanks a million!

Link to comment
Share on other sites

Hi guys, 

 

I have also problem with blocklayered and pagination. When filter are being applied, first they don't work at all and after several attempts they do but the the number of products looks weird...

 

Also meta title is being shown in and below the category banner.

 

My site: http://gatogato.sk.data21.websupport.sk/ (still testing mode) and sp of the issue: http://awesomescreenshot.com/0f72tqlqdf

 

 

Do you have any suggestions or advice please? I tried to rebuild the index and cache but nothing seem to work.

 

 

Thanks a million!

kipme have the solution....test it

Link to comment
Share on other sites

i think that this github commit can be helpful in this case

 

Jérôme Nadaud added a comment - 17/Apr/14 3:52 PM

Hello,

Thank you for reporting this bug is now fixed and change will be available in next release.
Please see:

https://github.com/PrestaShop/PrestaShop/commit/67aee64a5ec9a5023b8f4af0aeef8d7ddece2b65
and
https://github.com/PrestaShop/blocklayered/commit/d0f102a96baa15856dbfb66a65c5c696db24ba97

Best regards.

Link to comment
Share on other sites

If you update the module and use the Github Solution, it seems to work for me.

 

So :

 

1st ==> Update your module

 

2nd ==> Change or edit your blocklayered.js ( themes/default-bootstrap/js/modules/blocklayered ) with the one on Github : https://github.com/PrestaShop/PrestaShop/commit/67aee64a5ec9a5023b8f4af0aeef8d7ddece2b65

 

(In my case, I haven't touch the blocklayered.php)

 

3d ==> Clear cache and force compilation (BO performance)

 

Thanks to all the people who worked on this bug !

Edited by Guillaumeb59 (see edit history)
Link to comment
Share on other sites

If you update the module and use the Github Solution, it seems to work for me.

 

So :

 

1st ==> Update your module

 

2nd ==> Change or edit your blocklayered.js ( themes/default-bootstrap/js/modules/blocklayered ) with the one on Github : https://github.com/PrestaShop/PrestaShop/commit/67aee64a5ec9a5023b8f4af0aeef8d7ddece2b65

 

(In my case, I haven't touch the blocklayered.php)

 

3d ==> Clear cache and force compilation (BO performance)

 

Thanks to all the people who worked on this bug !

in the 2nd step you have the blocklayered.php link. You say that you didn't touch.

Can you explain more the 3nd step ? From where you cleared the cache and where are you force compilation?

Link to comment
Share on other sites

Untitled.png

Thank you very much my friend sorry for the stupid question :) Unfortunately nothing happened the problem remain. I did it step by step. www.urbanfashion.gr/new    any suggestion? i Change also blocklayered.php some days ago. Do you thing this is problem?

Link to comment
Share on other sites

If you update to the latest blocklayered module version and apply this github fix https://github.com/PrestaShop/PrestaShop/commit/26353c2a18b6d33f07c58722d187fd7cb7bbd036 as explained here http://forge.prestashop.com/browse/PSCSX-2030 that should work. On my 1.6.0.6 installation with default bootstrap it fixed both the page numbers issue AND the "show all issue" on 2nd or 3rd page.

 

Hope that helps.

Edited by Mister Denial (see edit history)
Link to comment
Share on other sites

Sorry for my mistake about the link, in my case I've only applied the solution for the blocklayered.js 


 


1st ==> Update your module and prestashop install with last version 


 


2nd ==> Change or edit your blocklayered.js ( themes/default-bootstrap/js/modules/blocklayered ) with the one on Github : https://raw.githubusercontent.com/PrestaShop/PrestaShop/26353c2a18b6d33f07c58722d187fd7cb7bbd036/themes/default-bootstrap/js/modules/blocklayered/blocklayered.js


 


In my case, I haven't touch the blocklayered.php, I've let the default file. 


 


3d ==> Clear cache and force compilation (BO performance) and clear your browser cache ( ctrl + F5 )


 


I hope It will works for you this time !


Link to comment
Share on other sites

Guys thank you very much. Now it work. Important note. Don't change nothing from blocklayered.php. I suppose that was my problem. Do exactly what Guillaumeb59 and Mister Denial says. A big problem remain. With IE and google chrome as you can see here http://www.urbanfashion.gr/new/3--     when you check works perfect... .but when you uncheck a filter disappeared the products anly the top and down pagination remain. In Firefox work perfect. Any idea?

  • Like 1
Link to comment
Share on other sites

One more problem exist in my case. I wonder if anyone else has problem with re-indexing url etc....I can not re-index or index nothing. Can someone of moderators to help? I also re-installed the module but nothing. I wonder if someone can send me all the folders of prestashop 1.6 (default bootstrap theme) concerning the layered navigation block.

Edited by gergos (see edit history)
Link to comment
Share on other sites

Hi Gergos,

 

I use 5.4.19 but there still is a problem, I thought the github fix did solve the problem, but actually there still is a problem, when you select more than one filter, all the products become invisible - the item count is correct, but nothing is displayed. 

 

So it looks like the blocklayered issue will last some more... sorry, I really thought that it was fixed.

Link to comment
Share on other sites

Hi Gergos,

 

I use 5.4.19 but there still is a problem, I thought the github fix did solve the problem, but actually there still is a problem, when you select more than one filter, all the products become invisible - the item count is correct, but nothing is displayed. 

 

So it looks like the blocklayered issue will last some more... sorry, I really thought that it was fixed.

Hello Denial can you test here my filters please ? http://www.urbanfashion.gr/new/3--  When i select a filter i can see the results. When i deselect disapeared my products. Are you face the same problem?

Link to comment
Share on other sites

Hello Denial can you test here my filters please ? http://www.urbanfashion.gr/new/3--  When i select a filter i can see the results. When i deselect disapeared my products. Are you face the same problem?

 

You have the same issue, if I select only one filter, everything is fine, but as soon as I select a second filter, all products disappear. For example, if I go to ΑΝΔΡΙΚΑ ΠΑΠΟΥΤΣΙΑ and select sneakers, it displays 36 products. I then select EU 42, which should only display 8 items, but there are 0 items.

 

However, if then unselect EU 42, there still is 0 products (instead of 36). If I then AGAIN select EU 42, it now shows the 8 products correctly. 

 

So it must be some sort of refresh bug.

Link to comment
Share on other sites

I also have problem even if i select just one filter. During selection is ok. If i deselect it desapeared the products. I hope it is the same problem and someone will fix it because it is a very serious bug.

Link to comment
Share on other sites

Did you tried this on a new installation of prestashop ? To check if your files are corupted or if it's the server you should try to install and add enough product and features to check if it's work.

 

If not try to applied the solution on github and if it's still not working we could suppose that's a bug or a problem with your server but not with your files. 

 

But if it works with the new installation that's a problem with your files.

Link to comment
Share on other sites

Did you tried this on a new installation of prestashop ? To check if your files are corupted or if it's the server you should try to install and add enough product and features to check if it's work.

 

If not try to applied the solution on github and if it's still not working we could suppose that's a bug or a problem with your server but not with your files. 

 

But if it works with the new installation that's a problem with your files.

Your site does not have any problem? You are not face the the problem that Mister Denial and i face?

Link to comment
Share on other sites

I Think I don't, could you try it on my website ?

 

http://www.occasionvin.fr

Firtst of all nice job :) Second there is no problem with your filters. Is it easy for you to tell me the php that your server use? And second do you know what are the folders that effect on the blocklayered ? I am asking only for replace that folders.

Link to comment
Share on other sites

Hi Guillaume,

 

nice site, and congrats, your filters work fine! :-)

 

The issue Gergos and I are having is already a reported bug http://forge.prestashop.com/browse/PSCSX-2030 and so far there is no solution. So it's strange but good to see someone who is not having this issue, gives us hope. Which PS version are you using? 1.6.0.6? And did you upgrade from a previous version, or did you install that version?

 

Kind regards,

 

Dan

Link to comment
Share on other sites

Hi Dan,

 

Thank you for congratulations :-)

 

I'm using the 1.6.0.6 version.

 

I've upgrated it from a 1.5 version then change my theme to a custom one to reinitialize the bootstrap theme, and finally get back to the bootstrap theme which has been reinitialized.

 

Good luck with this bug, I hope you'll find out what's wrong. 

 

Regards,

 

Guillaume

Link to comment
Share on other sites

hey everyone, I try do everything but there is only one solution: http://www.prestashop.com/forums/topic/318083-blocklayered-not-working-in-prestashop-16-help/

 

"Change blocklayered folder permissions to 755 and all file permissions to 644."

 

it meens:

root/modules/blocklayered/ this folder permissions to 755

root/modules/blocklayered/ files in this folder permissions to 644

 

works for me, no change/overwrite code in JS and PHP files, just permissions

 

cheers

 

p.s. no need clear cache in panel, only F5 in your webbrowser

Edited by knightrider132 (see edit history)
Link to comment
Share on other sites

Guys!Guys!Guys!

 

I take a fresh (github) module, I put a clean Presta and not see normal operation) 

It is strange to think that it prepared. 

 

1) Not work pagination

2) first click not work color choice 

3) crazy title ))))

 

let us test module and fix bugs, together)
Link to comment
Share on other sites

Guys,

I'm also struggling with block layered navigation. Everytime I use the filter, a "#" appears in the URL that makes product images disappear. If I manually remove the "#" and reload the page, all is well. Can't expect my website users to know this and do this everytime they use it!

 

Please help!! Would really appreciate it.

 

Thanks.

Link to comment
Share on other sites

Hi all,

 

I'm also still having issues with the pagination and layered navigation (v1.11). (prestashop 1.6.0.6)

 

When I click on a categorie, product list appears properly but when I hover over the pagination numbers 2, 3 ... I always see the same url appearing ...livingroom#/page-1. Altough I would expect it to be /page-2, page3 respectively. However when I look at the page source code, I see sometings what seems correct to me: href="/en/5-livingroom?p=2".

 

However when I click on the link the first page is displaying again. It is rather strange as from then on everything seems to work OK when clicking pagination. Unless you select another category.

 

Then it is getting even more strange. The number of products to display are standard to 30 however if I put them to 60. And I select another category. It will only show the first 30 products. Altough the select box displays number 60. The number of pages are also displayed as if 60 products where shown. Again the tooltip of the different numbers also refer to page 1. However when I click on page 2, it goes correctly to the next page. However people have now missed products 31-60. If then you stay in the same category, everthing seems to work normally switching from one page to the other.

 

Here is the link if you want to try it out www.belleetbeau-onlineshop.com

 

Any help is appreciated or should i report this as a bug?

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

Hi all,

 

I'm also still having issues with the pagination and layered navigation (v1.11). (prestashop 1.6.0.6)

 

When I click on a categorie, product list appears properly but when I hover over the pagination numbers 2, 3 ... I always see the same url appearing ...livingroom#/page-1. Altough I would expect it to be /page-2, page3 respectively. However when I look at the page source code, I see sometings what seems correct to me: href="/en/5-livingroom?p=2".

 

However when I click on the link the first page is displaying again. It is rather strange as from then on everything seems to work OK when clicking pagination. Unless you select another category.

 

Then it is getting even more strange. The number of products to display are standard to 30 however if I put them to 60. And I select another category. It will only show the first 30 products. Altough the select box displays number 60. The number of pages are also displayed as if 60 products where shown. Again the tooltip of the different numbers also refer to page 1. However when I click on page 2, it goes correctly to the next page. However people have now missed products 31-60. If then you stay in the same category, everthing seems to work normally switching from one page to the other.

 

Here is the link if you want to try it out www.belleetbeau-onlineshop.com

 

Any help is appreciated or should i report this as a bug?

 

I have the same problem. I try solved changing th permissions to block layered module folder but it doesn't work for me . Someone found a solution please?

Link to comment
Share on other sites

  • 1 month later...

 

Sorry for my mistake about the link, in my case I've only applied the solution for the blocklayered.js 

 

1st ==> Update your module and prestashop install with last version 

 

2nd ==> Change or edit your blocklayered.js ( themes/default-bootstrap/js/modules/blocklayered ) with the one on Github : https://raw.githubusercontent.com/PrestaShop/PrestaShop/26353c2a18b6d33f07c58722d187fd7cb7bbd036/themes/default-bootstrap/js/modules/blocklayered/blocklayered.js

 

In my case, I haven't touch the blocklayered.php, I've let the default file. 

 

3d ==> Clear cache and force compilation (BO performance) and clear your browser cache ( ctrl + F5 )

 

I hope It will works for you this time !

 

 

Worked like a charm! Saved my day! Big thanks!

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

Hi all,

 

I installed the layered navigation and it works great but the pagination and the productsortform are disabled on Firefox.

It works on Chrome, Safari and IE for me : http://www.brosstore.fr/23-fourches.

 

I've tried differents solutions : uninstall and install the module, repair index, add the js fix from Github (old post) ...

 

Someone have the same issue or know the solution ?

Thanks,

 

Prestashop = 1.6.0.6

Thème = Responsive Bike Store

Link to comment
Share on other sites

Hi all,

 

I installed the layered navigation and it works great but the pagination and the productsortform are disabled on Firefox.

It works on Chrome, Safari and IE for me : http://www.brosstore.fr/23-fourches.

 

I've tried differents solutions : uninstall and install the module, repair index, add the js fix from Github (old post) ...

 

Someone have the same issue or know the solution ?

Thanks,

 

Prestashop = 1.6.0.6

Thème = Responsive Bike Store

 

Hi there,

 

I just went to your store, and everything seems fine to me, the filters are working, pagination too. I am using the latest version of Firefox.

 

Did you find a fix for your problem, and if you did, can you please post the solution here for the others? Thanks!

Link to comment
Share on other sites

Hi all,

 

From the beginning I can see the pagination and the productsortform on Firefox but my client couldn't.

 

I don't know if it's the solution but I've corrected some W3C issues from the theme of my client :

  • missed lang="fr" in the head (I only had xml:lang="fr")
  • HTML tag improperly closed

And then it works for him.

 

I hope it will help you,

 

Cheers,

  • Like 1
Link to comment
Share on other sites

Hi all,

 

From the beginning I can see the pagination and the productsortform on Firefox but my client couldn't.

 

I don't know if it's the solution but I've corrected some W3C issues from the theme of my client :

  • missed lang="fr" in the head (I only had xml:lang="fr")
  • HTML tag improperly closed

And then it works for him.

 

I hope it will help you,

 

Cheers,

 

I'm sure it will help other people with the same problem. Mine was fixed with the latest Github patch already, but there still are others in this thread for whom that didn't work. My guess would be the improper HTML tag, those can really mess up a website.

 

And thanks for sharing your solution!

Edited by Mister Denial (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Guys thank you very much. Now it work. Important note. Don't change nothing from blocklayered.php. I suppose that was my problem. Do exactly what Guillaumeb59 and Mister Denial says. A big problem remain. With IE and google chrome as you can see here http://www.urbanfashion.gr/new/3--     when you check works perfect... .but when you uncheck a filter disappeared the products anly the top and down pagination remain. In Firefox work perfect. Any idea?

try changing the number of products per page. Preferences> Products> Products by page. To me it worked !! I was 12 products per page, I put 9 and it works ok in chrome and in all the browsers

  • Like 1
Link to comment
Share on other sites

Updated to v2.0.7 and this issue seemed to start, now I have to disable the module for pagination to work,  Tried to uninstall/reinstall, clear cache, change number of displayed products, etc but nothing works.  It seems the github fix is for an older version because the .js file looks a lot different than what's posted.  Why is this happening?!!

Link to comment
Share on other sites

×
×
  • Create New...