Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

30knees

Layered navigation interferes with theme pagination

Recommended Posts

I have the same problem that this person has: https://www.sunnytoo.com/forums/topic/problem-with-pagination-product-list

Basically, the layered navigation module interferes with pagination.

The theme developer says:

"The issue was due to Prestashop native filter module, that us ajax to load next page and didn’t refresh new page, please try deactivating the “Layered navigation block” module"

Is this a problem with the theme or with the layered navigation module?

Share this post


Link to post
Share on other sites

I'm sure its theme problem. The support answer was epic, blame native module which is works fine and suggest buying module that cost $230. The developer must find solution with their themes cc: @Jonny

Share this post


Link to post
Share on other sites

@30knees that's a compatibility problem. What disappear after go to next page? Which module you are using? If it's a paid one, then contact its developers for help, because all modules for TB/1.6 are supposed to work fine with "Layered navigation block" module. My colleague's answer was't that accuracy there, you don't need to use another filter module, if the module you are using is not a paid one, what you need to do is to integrate itwith the "Layered navigation block" module.

Share this post


Link to post
Share on other sites

There was a problem with the layered navigation module and pagination, which was fixed months ago: https://github.com/thirtybees/blocklayered/issues/2

Unfortunate is, this required fixes to JavaScript, which is usually overridden by themes. Accordingly, each theme needs these fixes applied. The three commits making up these fixes are listed in the last comment on this Github issue, you might want to show the issue to the theme developer.

Share this post


Link to post
Share on other sites

Thanks, all!

@Jonny The pagination doesn't work when using the layered navigation module. If I click on "next page" nothing happens.

Share this post


Link to post
Share on other sites

Share your site url, so I can take a look. Sounds like there's a javascript error on your site.

Share this post


Link to post
Share on other sites

Same problem in my 1.0.7 sand box with default theme... please add some product to the demo here on TB so it will be possible to test this on the official demo, too.

I think that it's the same issue I just posted, right?

Share this post


Link to post
Share on other sites

Perhaps it's a related issue, but it's not the same one. I don't even get to page 2. I stay on page 1.

Share this post


Link to post
Share on other sites

@30knees The problem was caused by the "Revws - Product Reviews" module you've installed, you will find everything works fine if you disable it. Contact the module's author to check if there's a compatibility problem with "Layered navigation block" module.

Share this post


Link to post
Share on other sites

@Jonny Aha, thanks for the investigation! :-)

@datakick Ping! See above. Apparently Revws conflicts with the Layered Navigation Block module. Have you noticed this before?

Share this post


Link to post
Share on other sites

@30knees this issue was already fixed in 1.0.21 / 2.0.3 release, please install latest version and test again

Share this post


Link to post
Share on other sites

@datakick I just installed 1.0.21 and the issue is there. I disable all the third parties module and the issue is there.

Share this post


Link to post
Share on other sites

done... but the issue is still there.

I think it's not possible that the issue is my nginx config because the issue is there without friendly urls too

no js errors in console

p.s. I'm using the italian translation (no other languages are installed)... I have to try with english (UK or USA)?

Share this post


Link to post
Share on other sites

I noticed that my problem is still there if I try to filter with blocklayered the ROOT category that includes all the other categories. In case I filter a sub-category the block layered works correctly.

Share this post


Link to post
Share on other sites

@foolab said in Layered navigation interferes with theme pagination:

I noticed that my problem is still there if I try to filter with blocklayered the ROOT category that includes all the other categories. In case I filter a sub-category the block layered works correctly.

I found this warning on the php error log file, can be related? PHP Warning: Invalid argument supplied for foreach() in /home/nginx/domains/domain.com/public/modules/blocklayered/blocklayered.php on line 1827 this is the content of the file from line 1827 and forward:

foreach ($data as $key_params => $params) { if (!isset($selected_filters[$key_params])) { $selected_filters[$key_params] = []; } foreach ($params as $key_param => $param) { if (!isset($selected_filters[$key_params][$key_param])) { $selected_filters[$key_params][$key_param] = []; } $selected_filters[$key_params][$key_param] = $this->filterVar($param); }

Share this post


Link to post
Share on other sites

Also having this problem. Sub categories filter is not working with pagination.

Category gets stripped out in:

website.com/aco#/categorias-aneis/cor-dourado/page-3

The final url becomes:

website.com/aco#/cor-dourado/page-3

Updated module and theme js/template overwrites. Disabled all caches. Rebuild module url and attribute indexes. 

No errors in js or php side. Any clues? How can i help?

  • Sad 1

Share this post


Link to post
Share on other sites

@FooLab workaround is to remove the category from layered navigation and activate/add the "block categories" module above the layered navigation block

  • Like 1

Share this post


Link to post
Share on other sites
On 4/24/2019 at 9:39 AM, pjr said:
 
 
1
On 4/24/2019 at 9:39 AM, pjr said:

@FooLab workaround is to remove the category from layered navigation and activate/add the "block categories" module above the layered navigation block

I can't understand. Which category I have to remove from layered navigation?


Anyways I noticed that the problem is there ONLY if I use the "manufacturer" filter... All the other filters are working.

I have manufacturers mirrored in features... If I filter with my "manufacturers feature" it works, if I use "core manufacturers" it's not.

Share this post


Link to post
Share on other sites
9 minutes ago, FooLab said:

I can't understand. Which category I have to remove from layered navigation?

  1. Go to "Modules and Services", search for "Block Layered Navigation" and hit the configure button at the right
  2. In the "Filters templates" panel click the "edit" button
  3. Scroll down to the "Filter" panel and disable the "Sub-categories filter"
  4. Hit "Save"
  5. Hit "Build attribute index" and "Build URL index" just to be safe

Next...

  1. Go to "Modules and Services", search for "Block Categories" install/enable and configure it to fit your preferences
  2. Go to "Modules and Services -> Positions".
  3. In "Search for a hook" input "displayLeftColumn"
  4. Check if "Block Layered Navigation" is assigned to the "displayLeftColumn" hook.

If "Block Layered Navigation" is not in "displayLeftColumn" hook:

  1. Go to "Modules and Services -> Positions" hit "Transplant a module" (top right)
  2. In the "Module" drop down select "Block Categories"
  3. In the " Transplant to" drop down select "displayLeftColumn"
  4. Select the pages you do not want to show the categories list
  5. Hit "Save"

 

Share this post


Link to post
Share on other sites

ok but in this way, you can't filter per categories

Anyway, the filter is working well for me know, I found that the problem was there activating the manufacturers' filter.

Share this post


Link to post
Share on other sites

In my case same problem was triggered by changing translation for template (Niara in TB 1.1.0).
Module functions comes to working fine even with pagination changing again after I´ve deleted translation php in themes/niara/modules/blocklayered/translations/ + deleted TB cache.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...