Jump to content

Layered navigation - disable ajax pagination


B. Szakacs

Recommended Posts

Hi there

 

I want to add an infinite scroll type script to my webshop. All is going well on normal pages (category, manufacturer, search etc) but i want to do this on layered navigation too, which currently is not possible, as this module replaces the pagination with it's own code, and has ajax instant load. This is nice of course, but i want infinite scroll here so i must disable ajax pagination.

 

I presume i must edit the "blocklayered.js", but this seems very very complex :) Any ideea?

 

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

This is the code related with "pagination" of the blocklayered.php

 

// Need a nofollow on the pagination links?
 $smarty->assign('no_follow', $filter_block['no_follow']);

 

 

// Add pagination variable
	$nArray = (int)Configuration::get('PS_PRODUCTS_PER_PAGE') != 200 ? array((int)Configuration::get('PS_PRODUCTS_PER_PAGE'), 200, 200, 200) : array(200, 200, 200);

 

 

/* We are sending an array in jSon to the .js controller, it will update both the filters and the products zones */
	return Tools::jsonEncode(array(
	'filtersBlock' => utf8_encode($this->generateFiltersBlock($selected_filters)),
	'productList' => utf8_encode($product_list),
	'pagination' => $smarty->fetch(_PS_THEME_DIR_.'pagination.tpl'),
	'categoryCount' => $category_count));

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

  • 1 month later...

Hi

 

Did not managed to solve it yet. Whatever i do to leave normal pagination for blocklayered, the module just brokes. I gave up :( But of course, any solution would be welcommed !

 

Hi,

 

Good that you got infinite scroll.

 

I am also trying to have infinite scroll for my product list.

 

Can you guide me how I can achieve this.

 

Thank you.

Link to comment
Share on other sites

  • 4 weeks later...
  • 5 weeks later...

I've only used it for a second but have you tried the free Infinite Ajax Scroll module at http://www.prestashop.com/forums/topic/232911-module-infinite-ajax-scroll-d%C3%A9filement-infini-en-ajax/?do=findComment&comment=1145759? At the time of writing the author believed it to be the only infinite scrolling module that supports layered navigation - and it's free!

 

If you decide to use it, make sure you replace or create /theme/your-theme/js/modules/blocklayered/blocklayered.js with the file in post #18 http://www.prestashop.com/forums/topic/232911-module-infinite-ajax-scroll-d%C3%A9filement-infini-en-ajax/?do=findComment&comment=1225025.

Link to comment
Share on other sites

  • 11 months later...
  • 2 months later...
  • 3 years later...

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...