Jump to content

Recommended Posts

Hello,

I have a problem with this module - Presta 1.6.
The module works fine, but when I use filter, for example price (sliders) boxes lose UTF-8 encoding. 
I added 'encoding: utf-8' in jquery.infinitescroll.js but the problem didn't disappear.
Any ideas? 

Share this post


Link to post
Share on other sites

Hello ibndawood,

 

 

I used this modules on PS 1.6.0.8.

It works fine without Blocklayered navigation module.

But when I filter some products through blocklayered then it is some buggy.

Sometimes products loads double times (without filter + filter result).

Is there any solution of it?

 

Thanks

Share this post


Link to post
Share on other sites

add in product-list.tpl id="product_list" for ul

 

 

example:

 

<ul{if isset($id) && $id} id="{$id}"{else} id="product_list"{/if} class="product_list grid row{if isset($class) && $class} {$class}{/if}">    

Share this post


Link to post
Share on other sites

just installed module on my 1.5.6 custom theme.

 

the loading part doing great, but there is page selection at the bottom of page.. should i have to remove it manually or there may be configuration error?

Share this post


Link to post
Share on other sites

 

add in product-list.tpl id="product_list" for ul

 

 

example:

 

<ul{if isset($id) && $id} id="{$id}"{else} id="product_list"{/if} class="product_list grid row{if isset($class) && $class} {$class}{/if}">    

 

where to add all this

 

thanks

Share this post


Link to post
Share on other sites

Hi All,

 

Thanks a ton to ibndawwod for great module.

 

This module is working fine in 1.5 as well as in 1.6 , Please make sure you have configured it properly.

 

I have gone through this topic and found that many of them told that its not working well with Layered Navigation module well after filter in Presta v1.6.

 

Here is the solution and working fine for me.

 

in blocklayered.js file find below code (approx. line # 539)

if ($('<div/>').html(pagination_bottom).find('#pagination_bottom').length)
{
	$('#pagination_bottom').show();
	$('#pagination_bottom').replaceWith(pagination_bottom.find('#pagination_bottom'));
}

and replace it with below code

if ($('<div/>').html(pagination_bottom).find('#pagination_bottom').length)
{
	var noOfPages = $(result.pagination_bottom).find('ul.pagination > li').length;
	infinite_scroll.maxPage = noOfPages - 2;
	var path = 'modules/blocklayered/blocklayered-ajax.php?'+data+params_plus+n+'&p=';
	infinite_scroll.path = [ path , ""] ;
	infinite_scroll.dataType = 'json';
	infinite_scroll.template = function(data){
	var productList = '<div>' + data.productList + '</div>';
	var ht = $(productList).find(infinite_scroll.contentSelector).html();
	return ht;
	}
	$( infinite_scroll.contentSelector ).infinitescroll( infinite_scroll, function(newElements, data, url) { eval(infinite_scroll.callback); }); 

	$('#pagination_bottom').show();
	$('#pagination_bottom').replaceWith(pagination_bottom.find('#pagination_bottom'));
}

That's it!!!

  • Like 1

Share this post


Link to post
Share on other sites

Thank you ibndawood for this free module

But I think I need help on figuring out the configuration of the module

the content selector and the navigation selector and ...

can you help me with them plz

this is my website

http://lobaab.com/

 

I would appreciate a lot.

and also is it possible to customize the module so that it only loads more products when we click the load more button at the end of the products page?

Share this post


Link to post
Share on other sites

installed on 1.6, scroll works but images disappeared. strange.

 

nice though, thanks.

Hi cagrie

I have also ps 1.6. but it doesn't work. and since in dawood is not answering ,can you tell me what configuration you did?plz thankyou

Share this post


Link to post
Share on other sites

Tested on 1.6.0.9 and it doesn't works... Can someone that have this module working on PS1.6. share how they achieved this?

Share this post


Link to post
Share on other sites

everything work fine when i select english but when i select 2nd language (chinese) it only manage to go page 2 after that not respond at all..  i'm using 1.6 Any help/advise?

 

English

 ["heading into ajax", "/prestashop/index.php?id_category=12&controller=category&id_lang=1&p=2"]
v_38_d0220dafbd3c64ba4950cf759dc86b72.js:839 Using HTML via .load() method
 ["heading into ajax", "/prestashop/index.php?id_category=12&controller=category&id_lang=1&p=3"]
v_38_d0220dafbd3c64ba4950cf759dc86b72.js:839 Using HTML via .load() method
 ["heading into ajax", "/prestashop/index.php?id_category=12&controller=category&id_lang=1&p=4"]
v_38_d0220dafbd3c64ba4950cf759dc86b72.js:839 Using HTML via .load() method
 

Chinese
 ["heading into ajax", "/prestashop/index.php?id_category=12&controller=category&id_lang=2&p=2"]
v_38_d0220dafbd3c64ba4950cf759dc86b72.js:839 Using HTML via .load() method
 ["heading into ajax", "/prestashop/index.php?id_category=12&controller=category&id_lang=3&p=2"]
v_38_d0220dafbd3c64ba4950cf759dc86b72.js:839 Using HTML via .load() method

Edited by jamesng79 (see edit history)

Share this post


Link to post
Share on other sites

Hi Guys,

 

Scroll is not working for me, i have installed his module and updated the blocklayed.js code as well. But still not working for me.

 

Please help.

Share this post


Link to post
Share on other sites

Hi, I instalss on PS 1.6.0.9 with default theme and d'ont work

 

My configuration in this image

 

I Made change on blocklayered js file

 

Is my configuration good?

 

 

post-171791-0-32666200-1420541081_thumb.jpeg

Edited by hostxxi (see edit history)

Share this post


Link to post
Share on other sites

Hi,

 

I am sure it will be an interesting module, however it could not work for me. May be due to the version. I am using 1.6.0.11. Is there any new release for the latest PS.

 

I tried to look at the demo from the link as provided but the link seems expired

 

Appreciate.

Edited by yashman (see edit history)

Share this post


Link to post
Share on other sites

I want to use infinite scroll module for blog page.In my blog page I have used pagination for blog posts.I want to remove pagination from blog page and use infinite scroll. I have already used infinite scroll for my product categories page,now i want the same for blog page as well. How can I do that kindly help.

Share this post


Link to post
Share on other sites

On my prestashop 1.6.0.13 unfortunately does not work. I am using the template "warehouse". Can anyone tell what you should rearrange the module to work

Share this post


Link to post
Share on other sites

I want to load not all next page. Is there the way to load each time one row of products.

In what file can i do this? Do you have anything thoughts about this?

Edited by redwert (see edit history)

Share this post


Link to post
Share on other sites

Hi All,

 

Thanks a ton to ibndawwod for great module.

 

This module is working fine in 1.5 as well as in 1.6 , Please make sure you have configured it properly.

 

I have gone through this topic and found that many of them told that its not working well with Layered Navigation module well after filter in Presta v1.6.

 

Here is the solution and working fine for me.

 

in blocklayered.js file find below code (approx. line # 539)

if ($('<div/>').html(pagination_bottom).find('#pagination_bottom').length)
{
	$('#pagination_bottom').show();
	$('#pagination_bottom').replaceWith(pagination_bottom.find('#pagination_bottom'));
}

and replace it with below code

if ($('<div/>').html(pagination_bottom).find('#pagination_bottom').length)
{
	var noOfPages = $(result.pagination_bottom).find('ul.pagination > li').length;
	infinite_scroll.maxPage = noOfPages - 2;
	var path = 'modules/blocklayered/blocklayered-ajax.php?'+data+params_plus+n+'&p=';
	infinite_scroll.path = [ path , ""] ;
	infinite_scroll.dataType = 'json';
	infinite_scroll.template = function(data){
	var productList = '<div>' + data.productList + '</div>';
	var ht = $(productList).find(infinite_scroll.contentSelector).html();
	return ht;
	}
	$( infinite_scroll.contentSelector ).infinitescroll( infinite_scroll, function(newElements, data, url) { eval(infinite_scroll.callback); }); 

	$('#pagination_bottom').show();
	$('#pagination_bottom').replaceWith(pagination_bottom.find('#pagination_bottom'));
}

That's it!!!

 

 

Dear Divyesh,

 

For me (PS 1.6.0.9 + masonry on category pages), everything is working fine without using blocklayered

 

Even thought I paste your code in my blocklayered.js , after having clicked on a layered option:

 

- Infinite scroll still works but does not only display the new product_list refreshed by ajax, it displays products from the category (which means the new product_list may not be well transmitted to infinite scroll?)

 

- There seem to be a problem with the number of pages (?)

 

 

Did you or anybody find a solution to make this module work with PS 1.6+Blocklayered ?

 

 

Erwan

 

Thank you ibndawwod !

 

 

Edited by ERWAN DUB (see edit history)

Share this post


Link to post
Share on other sites

Hi, I just installed the module on prestashop 1.6 my site www.districtcart.com but it doesn't work, the pagination is still the old one. I replaced the code on blocklayered.js, what elso should i do? This are the settings in my module, they automatically appeared here, i'm not sure if they apply to my theme.

 

Can u please help me to solve this problem

 

Thanks in Advance

Share this post


Link to post
Share on other sites

Hi,

 

Thanks for the module. It is working nicely. But a problem occur when I change the view from grid to list and scroll down. The first page will displays as list and when the second page loads, the products are displaying in grid. Any help??

Share this post


Link to post
Share on other sites

Work good on PrestaShop™ 1.6.0.14, no problem with grid/list products show.

Share this post


Link to post
Share on other sites

Hi, I just installed the module on prestashop 1.6 my site www.districtcart.com but it doesn't work, the pagination is still the old one. I replaced the code on blocklayered.js, what else should i do? This are the settings in my module, they automatically appeared here, i'm not sure if they apply to my theme.


 


Can u please help me to solve this problem


Share this post


Link to post
Share on other sites

Try this

 

Hi Kerm.

 

I tried to use the same configuration and changed the code in blocklayered.js still it is not functioning. 

 

I am using a custom theme and I tried to check what is going wrong but I am not able to fix it. Any help will be appreciated a lot.

 

Website URL: http://vastrada.in and I have enabled the module. Thank you! :)

Share this post


Link to post
Share on other sites

You see my screenshot? try change this field.

Share this post


Link to post
Share on other sites

You see my screenshot? try change this field.

Yes I tried those in your screenshot and tried others which I thought could be but still no luck. 

Share this post


Link to post
Share on other sites

 

Infinite Scroll Implementation for Prestashop. Automatically append the next page of products (via AJAX) to your page when a user scrolls to the bottom.

 

This module is based on the infinite-scroll jQuery plugin by Paul Irish

 

Source Code : https://github.com/Prestastrap/infinite-scroll-prestashop

 

Demo : http://demo.prestastrap.com/mudhal/en/19-bags

 

Latest Stable Release : 1.1 attachicon.gifinfinitescroll.zip

 

Previous Releases : (Including this just to keep track of total downloads)

 

1.0 - attachicon.gifinfinitescroll.zip

Features

  • Works with any Prestashop 1.5.x theme
  • Fully customizable to adapt to your site and theme
  • Requires no (hopefully) template hacking, only a knowledge of CSS selectors.
  • Countless API endpoints to modify the behavior.
  • Backwards compatible: Will not break RSS readers, mobile devices, or browsers with javascript.
  • Activated in 'best-sales', 'category', 'manufacturer', 'new-products', 'search' and 'supplier' controllers.

Installation

  • Login to your Prestashop site as an Administrator
  • Navigate to Modules->Add a new module on top right
  • Upload the module zip file and click on Upload this module.
  • Search for "Infinite Scroll" from Modules List and Click "Install"
  • Click "Configure" to access configuration

Working with Block Layered Module

 

Block layered module uses ajax to load new products into the page after filtering. We need to create a new instance of infinite scroll everytime a the page is being refreshed.

  • You need to edit the file blocklayered.js of the block layered module.
  • Search for the function reloadContent (line 327 of Prestashop v1.5.6.0)
  • Scroll down until you find this piece of code

    if (result.pagination.search(/[^\s]/) >= 0) {
    if ($(result.pagination).find('ul.pagination').length){
            $('div#pagination').show();
            $('ul.pagination').each(function () {
                $(this).replaceWith($(result.pagination).find('ul.pagination'));
            });
    }
  • Replace the above piece of code with this one :

    if (result.pagination.search(/[^\s]/) >= 0) {
    if ($(result.pagination).find('ul.pagination').length){
        $('div#pagination').show();
        $('ul.pagination').each(function () {
            $(this).replaceWith($(result.pagination).find('ul.pagination'));
        });
        var noOfPages = $(result.pagination).find('ul.pagination > li').length; //Write the login to find the no of pages in your theme
        infinite_scroll.maxPage = noOfPages - 2;
        var path = 'modules/blocklayered/blocklayered-ajax.php?'+data+params_plus+n+'&p=';
        infinite_scroll.path = [ path , ""] ;
        infinite_scroll.dataType = 'json';
        infinite_scroll.template = function(data){
            var productList = '<div>' + data.productList + '</div>';
            var ht = $(productList).find(infinite_scroll.contentSelector).html();
            return ht;
        }
        $( infinite_scroll.contentSelector ).infinitescroll( infinite_scroll, function(newElements, data, url) { eval(infinite_scroll.callback); });
    }
  • And Infinite scroll should work with block layered module

Changelog

1.1

  • 2013 December 7 - Fixed bugs related to blocklayered and module controllers.

1.0

  • 2013 November 27 - 1.0 release.

 

infinite scroll not load internal script on products in product-list.tpl

Share this post


Link to post
Share on other sites

Hi there, thanks for sharing this module.
In my shop it doesn't work, Vers 1.6.0.9 and Leo shopping theme installed.

In the category page and subcategory page I have "content_sortPagiBar" with number page, filter etc... maybe is it the issue?

someone can help me, please?

thanks to everyone :)

Edited by la cuba (see edit history)

Share this post


Link to post
Share on other sites

Hello, 

 

I successfully implemented an infinite scroll module on Prestashop 1.6.0.11 (A custom theme) and 1.6.1.0 (Default theme). 

 

I found this module on GitHub a couple of months ago and finally today I got success implementing it. Hence I have no direct link for it or know who created it. 

 

Link to module: ...

 

Let me know if you stumble upon something here. Happy to help! Cheers! 

  • Like 1

Share this post


Link to post
Share on other sites

hi !

 

infinite scroll only work in the category pages ?

 

this dont work in the front page, principal page, index.php. . .for example infinite scroll for the NEW PRODUCTS only in the  index ??????

Share this post


Link to post
Share on other sites

Hi,

 Is this module compatible with Prestashop 1.6? If so, what are the changes to be made?

 Request for the help. Thanks in advance

Share this post


Link to post
Share on other sites

weather this module works with prestashop 1.6.1 ?

 

when i tried to install its give error

 

"The following module(s) could not be installed properly:

  • infinitescroll : 
        Technical error: PrestaShop could not install this module."

Share this post


Link to post
Share on other sites

Working prestashop 1.6?????

Hello good module

 

Working prestashop 1.6?????

Hello good module

 

Working prestashop 1.6?????

Share this post


Link to post
Share on other sites


Hello,

I successfully implemented an infinite scroll module on Prestashop 1.6.0.11 (A custom theme) and 1.6.1.0 (Default theme).

I found this module on GitHub a couple of months ago and finally today I got success implementing it. Hence I have no direct link for it or know who created it.

Link to module: https://www.mediafire.com/download/c8a72247ck4xwy2/muinfinitescroll.rar

Let me know if you stumble upon something here. Happy to help! Cheers! [/quote


great this I worked for me in version 1.6.1.1 PS !!! :) :) :) :)

configuration working for me:

 

Content Selector>>>#center_column
Navigation Selector>>>.bottom-pagination-content, .top-pagination-content
Next Selector>>> .pagination_next > a
Item Selector>>> .product_list

 

 
 
the products not only mandated to perfection, always it appears on page number I would like to eliminate, if someone can continue working with the module.
 

les produits non seulement le mandat de la perfection, apparaît toujours sur le numéro de page, je tiens à éliminer, si quelqu'un peut continuer à travailler avec le module.
 

Edited by chucurulo (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Hello, 

 

I successfully implemented an infinite scroll module on Prestashop 1.6.0.11 (A custom theme) and 1.6.1.0 (Default theme). 

 

I found this module on GitHub a couple of months ago and finally today I got success implementing it. Hence I have no direct link for it or know who created it. 

 

Link to module: https://www.mediafire.com/download/c8a72247ck4xwy2/muinfinitescroll.rar

 

Let me know if you stumble upon something here. Happy to help! Cheers! 

 

hello friend,

 

the module work very well for me ps 1.6.

 

I wonder if you know how I can add the module CCS ??

 

thank you.

Share this post


Link to post
Share on other sites

 

Hello,

 

I successfully implemented an infinite scroll module on Prestashop 1.6.0.11 (A custom theme) and 1.6.1.0 (Default theme).

 

I found this module on GitHub a couple of months ago and finally today I got success implementing it. Hence I have no direct link for it or know who created it.

 

Link to module: https://www.mediafire.com/download/c8a72247ck4xwy2/muinfinitescroll.rar

 

Let me know if you stumble upon something here. Happy to help! Cheers! [/quote

 

 

great this I worked for me in version 1.6.1.1 PS !!! :) :) :) :)

 

configuration working for me:

 

Content Selector>>>#center_column

Navigation Selector>>>.bottom-pagination-content, .top-pagination-content

Next Selector>>> .pagination_next > a

Item Selector>>> .product_list

 

 
 
the products not only mandated to perfection, always it appears on page number I would like to eliminate, if someone can continue working with the module.
 

les produits non seulement le mandat de la perfection, apparaît toujours sur le numéro de page, je tiens à éliminer, si quelqu'un peut continuer à travailler avec le module.

 

 

Bonjour j'ai essayé de l'installer j'ai renseigné les meme champs que vous mais ca ne fonctionne pas pouvez vous m'aider?

Cordialement

Sébastien

Share this post


Link to post
Share on other sites

Here is the updated working module for Prestashop 1.6.1

Click here to Download Now

 

After installing, search in the module list, it will be infinity scroll.

 

:) 


Hi, friends, here is the updated working module for Prestashop 1.6.1

Click here to Download Now

 

After installing, search in the module list, it will be infinity scroll.

 

:) 

  • Like 3

Share this post


Link to post
Share on other sites

HI everybody,

 

thanks for all the good stuff being shared!!

 

However, I didn't manage to get it properly working with Blocklayered activated...

 

I did tune a bit the blocklayered.js, as mentioned here on the forum, but still doesn't work... If someone has any clue, I'm not that good with js...

 

Here is what I did in my themes/{mytemplate}/js/module/blocklayered/blocklayered.js

if ($('<div/>').html(pagination).find('#pagination').length)
{
          $('#pagination').show();
	  $('#pagination').replaceWith(pagination.find('#pagination'));
          var noOfPages = $('<div/>').html(pagination).find('#pagination').length;
          infinite_scroll.maxPage = noOfPages - 2;
          var path = 'modules/blocklayered/blocklayered-ajax.php?'+data+params_plus+n+'&p=';
          infinite_scroll.path = [ path , ""] ;
          infinite_scroll.dataType = 'json';
          infinite_scroll.template = function(data){
              var productList = '<div>' + data.productList + '</div>';
              var ht = $(productList).find(infinite_scroll.contentSelector).html();
              return ht;
          }
          $( infinite_scroll.contentSelector ).infinitescroll( infinite_scroll, function(newElements, data, url) { eval(infinite_scroll.callback); });
}

I'll take any advice  :)

 

Sorry forgot to say I run a Prestashop 1.6.014

Edited by Mat_D1245 (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

HI everybody,

 

thanks for all the good stuff being shared!!

 

However, I didn't manage to get it properly working with Blocklayered activated...

 

I did tune a bit the blocklayered.js, as mentioned here on the forum, but still doesn't work... If someone has any clue, I'm not that good with js...

 

Here is what I did in my themes/{mytemplate}/js/module/blocklayered/blocklayered.js

if ($('<div/>').html(pagination).find('#pagination').length)
{
          $('#pagination').show();
	  $('#pagination').replaceWith(pagination.find('#pagination'));
          var noOfPages = $('<div/>').html(pagination).find('#pagination').length;
          infinite_scroll.maxPage = noOfPages - 2;
          var path = 'modules/blocklayered/blocklayered-ajax.php?'+data+params_plus+n+'&p=';
          infinite_scroll.path = [ path , ""] ;
          infinite_scroll.dataType = 'json';
          infinite_scroll.template = function(data){
              var productList = '<div>' + data.productList + '</div>';
              var ht = $(productList).find(infinite_scroll.contentSelector).html();
              return ht;
          }
          $( infinite_scroll.contentSelector ).infinitescroll( infinite_scroll, function(newElements, data, url) { eval(infinite_scroll.callback); });
}

I'll take any advice  :)

 

Sorry forgot to say I run a Prestashop 1.6.014

 

Without any modification to blocklayered.js infinite scroll works for me. However, problem appears when a new filter is activated and no more than one page exists, in that case previous infinite_scroll object declared continues to be triggered (I don't know how).

So, in order to fix this situation I'm trying to get update that first object, but no results until now.

Share this post


Link to post
Share on other sites

Hello,

Great module working well on 1.6.1.1 ..

But i want the same infinite scroll in "promotions" (in french, sorry)
Somebody doing this already and can tell me how to do ?

Thanks in advance

 

Brice

Share this post


Link to post
Share on other sites

Hello,

Great module working well on 1.6.1.1 ..

But i want the same infinite scroll in "promotions" (in french, sorry)

Somebody doing this already and can tell me how to do ?

Thanks in advance

 

Brice

 

Just modify file infinitescroll.php as below:

function shouldLoadJavascript() {
        $enabledControllers = array( 'best-sales', 'category', 'manufacturer', 'new-products', 
            'search', 'supplier');
        if(isset($this->context->controller->php_self)){
            if(in_array($this->context->controller->php_self, $enabledControllers)){
                return true;
            }
        }
        return false;
    }

by

function shouldLoadJavascript() {
        $enabledControllers = array( 'best-sales', 'category', 'manufacturer', 'new-products', 
            'search', 'supplier','prices-drop');
        if(isset($this->context->controller->php_self)){
            if(in_array($this->context->controller->php_self, $enabledControllers)){
                return true;
            }
        }
        return false;
    }

Share this post


Link to post
Share on other sites

Thanks for your quick answer, but i dont have this in my file.!
my files names is muinfinitescroll.php ... and i can found only this :

<?php

if (!defined('_PS_VERSION_'))
	exit;

class MuInfiniteScroll extends Module {
	
	public function __construct()
	{
		$this->name = 'muinfinitescroll';
		$this->tab = 'front_office_features';
		$this->version = '1.0';
		$this->author = 'vmulot';
		$this->need_instance = 0;
		$this->ps_versions_compliancy = array('min' => '1.6');
		$this->bootstrap = true;
		
		parent::__construct();
		
		$this->displayName = $this->l('Mu Infinite Scroll');
		$this->description = $this->l('Automatically loads the next page of products into the bottom of the initial page.');
		$this->confirmUninstall = $this->l('Are you sure you want to uninstall?');
	}

	public function install()
	{
		Configuration::updateValue('MU_INF_SCROLL_LOADING_TXT',$this->l( 'Loading...' ));
		Configuration::updateValue('MU_INF_SCROLL_LOADING_END',$this->l( 'No more products...' ));
		Configuration::updateValue('MU_INF_SCROLL_LOADING_IMG',$this->_path.'views/img/ajax-loader.gif');
		Configuration::updateValue('MU_INF_SCROLL_NEXT_SELECTOR','.pagination_next > a');
		Configuration::updateValue('MU_INF_SCROLL_ITEM_SELECTOR','.product_list > li');
		Configuration::updateValue('MU_INF_SCROLL_CONTENT_SELECTOR','.product_list');
		Configuration::updateValue('MU_INF_SCROLL_NAV_SELECTOR','.content_sortPagiBar');

		if (!parent::install() OR !$this->registerHook('displayFooter') OR  !$this->registerHook('displayHeader'))
			return false;

		return true;
	}

	public function uninstall()
	{
		if (!Configuration::deleteByName('MU_INF_SCROLL_LOADING_TXT')
			|| !Configuration::deleteByName('MU_INF_SCROLL_LOADING_END')
			|| !Configuration::deleteByName('MU_INF_SCROLL_LOADING_IMG')
			|| !Configuration::deleteByName('MU_INF_SCROLL_NEXT_SELECTOR')
			|| !Configuration::deleteByName('MU_INF_SCROLL_ITEM_SELECTOR')
			|| !Configuration::deleteByName('MU_INF_SCROLL_CONTENT_SELECTOR')
			|| !Configuration::deleteByName('MU_INF_SCROLL_NAV_SELECTOR')
			|| !parent::uninstall())
			return false;
		return true;
	}
	
	public function getContent()
	{
		$output = '';
		if(Tools::isSubmit('submitMuInfiniteScroll'))
		{
			Configuration::updateValue('MU_INF_SCROLL_LOADING_TXT', Tools::getValue('MU_INF_SCROLL_LOADING_TXT'));
			Configuration::updateValue('MU_INF_SCROLL_LOADING_END', Tools::getValue('MU_INF_SCROLL_LOADING_END'));
			Configuration::updateValue('MU_INF_SCROLL_LOADING_IMG', Tools::getValue('MU_INF_SCROLL_LOADING_IMG'));
			Configuration::updateValue('MU_INF_SCROLL_NEXT_SELECTOR', Tools::getValue('MU_INF_SCROLL_NEXT_SELECTOR'));
			Configuration::updateValue('MU_INF_SCROLL_ITEM_SELECTOR', Tools::getValue('MU_INF_SCROLL_ITEM_SELECTOR'));
			Configuration::updateValue('MU_INF_SCROLL_CONTENT_SELECTOR', Tools::getValue('MU_INF_SCROLL_CONTENT_SELECTOR'));
			Configuration::updateValue('MU_INF_SCROLL_NAV_SELECTOR', Tools::getValue('MU_INF_SCROLL_NAV_SELECTOR'));
		}
			
			if (isset($errors) && count($errors))
				$output .= $this->displayError(implode('<br />', $errors));
			else
				$output .= $this->displayConfirmation($this->l('Your settings have been updated.')); 

		return $output.$this->renderForm();
	}

	public function renderForm()
	{
		$fields_form = array(
			'form' => array(
				'legend' => array(
					'title' => $this->l('Settings'),
					'icon' => 'icon-cog'
				),
				'input' => array(
					array(
						'type' => 'text',
						'label' => $this->l('Content Selector'),
						'name' => 'MU_INF_SCROLL_CONTENT_SELECTOR',
						'class' => 'fixed-width-xl',
					),
					array(
						'type' => 'text',
						'label' => $this->l('Navigation Selector'),
						'name' => 'MU_INF_SCROLL_NAV_SELECTOR',
						'class' => 'fixed-width-xl',
					),
					array(
						'type' => 'text',
						'label' => $this->l('Next Selector'),
						'name' => 'MU_INF_SCROLL_NEXT_SELECTOR',
						'class' => 'fixed-width-xl',
					),
					array(
						'type' => 'text',
						'label' => $this->l('Item Selector'),
						'name' => 'MU_INF_SCROLL_ITEM_SELECTOR',
						'class' => 'fixed-width-xl',
					),
					array(
						'type' => 'textarea',
						'label' => $this->l('Loading message'),
						'name' => 'MU_INF_SCROLL_LOADING_TXT',
						'class' => 'fixed-width-xl',
					),
					array(
						'type' => 'textarea',
						'label' => $this->l('End message'),
						'name' => 'MU_INF_SCROLL_LOADING_END',
						'class' => 'fixed-width-xl',
					),
					array(
						'type' => 'text',
						'label' => $this->l('Loading img'),
						'name' => 'MU_INF_SCROLL_LOADING_IMG',
						'class' => 'fixed-width-xl',
					)
				),
				'submit' => array(
					'title' => $this->l('Save'),
				)
			)
		);
		
		$helper = new HelperForm();
		$helper->show_toolbar = true;
		$helper->table = $this->table;
		$lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
		$helper->default_form_language = $lang->id;
		$helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
		$this->fields_form = array();

		$helper->identifier = $this->identifier;
		$helper->submit_action = 'submitMuInfiniteScroll';
		$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
		$helper->token = Tools::getAdminTokenLite('AdminModules');
		$helper->tpl_vars = array(
			'fields_value' => array(
				'MU_INF_SCROLL_CONTENT_SELECTOR' => Tools::getValue('MU_INF_SCROLL_CONTENT_SELECTOR', Configuration::get('MU_INF_SCROLL_CONTENT_SELECTOR')),
				'MU_INF_SCROLL_NAV_SELECTOR' => Tools::getValue('MU_INF_SCROLL_NAV_SELECTOR', Configuration::get('MU_INF_SCROLL_NAV_SELECTOR')),
				'MU_INF_SCROLL_NEXT_SELECTOR' => Tools::getValue('MU_INF_SCROLL_NEXT_SELECTOR', Configuration::get('MU_INF_SCROLL_NEXT_SELECTOR')),
				'MU_INF_SCROLL_ITEM_SELECTOR' => Tools::getValue('MU_INF_SCROLL_ITEM_SELECTOR', Configuration::get('MU_INF_SCROLL_ITEM_SELECTOR')),
				'MU_INF_SCROLL_LOADING_TXT' => Tools::getValue('MU_INF_SCROLL_LOADING_TXT', Configuration::get('MU_INF_SCROLL_LOADING_TXT')),
				'MU_INF_SCROLL_LOADING_END' => Tools::getValue('MU_INF_SCROLL_LOADING_END', Configuration::get('MU_INF_SCROLL_LOADING_END')),
				'MU_INF_SCROLL_LOADING_IMG' => Tools::getValue('MU_INF_SCROLL_LOADING_IMG', Configuration::get('MU_INF_SCROLL_LOADING_IMG')),
				),
			'languages' => $this->context->controller->getLanguages(),
			'id_language' => $this->context->language->id
		);

		return $helper->generateForm(array($fields_form));
	}

	public function hookDisplayHeader($params)
	{
		if(!$this->loadJs())
			return;
		
		$this->context->controller->addJS($this->_path.'views/js/jquery.infinitescroll.min.js');
	}
	
	public function hookDisplayFooter($params)
	{
		if(!$this->loadJs())
			return;
		
		$options = array(
			'loading' => array(
				'msgText' => Configuration::get('MU_INF_SCROLL_LOADING_TXT'),
				'finishedMsg' => Configuration::get('MU_INF_SCROLL_LOADING_END'),
				'img' => Configuration::get('MU_INF_SCROLL_LOADING_IMG')
			),
			'nextSelector' => Configuration::get('MU_INF_SCROLL_NEXT_SELECTOR'),
			'navSelector' => Configuration::get('MU_INF_SCROLL_NAV_SELECTOR'),
			'itemSelector' => Configuration::get('MU_INF_SCROLL_ITEM_SELECTOR'),
			'contentSelector' => Configuration::get('MU_INF_SCROLL_CONTENT_SELECTOR'),
			'debug' => false,
			'behavior' => '',
			'callback' => ''
		);

		$options = json_encode($options);
		
		$this->smarty->assign(array('options' => $options));
		return $this->display(__FILE__, 'views/templates/hook/footer.tpl');
	}

	public function loadJs()
	{
		$enabledControllers = array( 'best-sales', 'category', 'manufacturer', 'new-products', 'search', 'supplier');
		if(isset($this->context->controller->php_self)){
			if(in_array($this->context->controller->php_self, $enabledControllers))
				return true;
		}
		return false;
	}

}
?>

I look few message on top of our..! and it s the same module.!

Share this post


Link to post
Share on other sites

Great..!! Thanks a lot..!!! It's working well...

dont you have problems with blocklayered? I can see your website?

Share this post


Link to post
Share on other sites

there you have in line 200, it has another function name but does the same,

 

Great..!! Thanks a lot..!!! It's working well...

Share this post


Link to post
Share on other sites

Hello

Will it work with module homefeatured ? somebody can show her/his site with this installed module ?

 

Thanks

Share this post


Link to post
Share on other sites

Without any modification to blocklayered.js infinite scroll works for me. However, problem appears when a new filter is activated and no more than one page exists, in that case previous infinite_scroll object declared continues to be triggered (I don't know how).

So, in order to fix this situation I'm trying to get update that first object, but no results until now.

Yes, that is exactly my problem... 

 

It isn't that bad, but still a bit puzzling as customer visiting the website.

 

If someone has a hint to put me on the tracks to solve that issue, I'd be thankful!

Share this post


Link to post
Share on other sites

I'm sorry for the mistakes, i write yos through translator from Ukraine. please help set up this module with blocklayered. I did all the instructions, but does not work with blocklayered. My Prestashop version 1.6, theme default_bootstrap. My site - http://miklovan.com.ua/    answer me to email - maximnemchinov@gmail.com

Edited by hazaina (see edit history)

Share this post


Link to post
Share on other sites

Hi,

 

Great module it work perfectly without any modification on prestashop 1.6.1.3, just I don't know why he can't find the ajax-loader.gif, as you can see. A solution about that ?

post-834635-0-15436000-1451412671_thumb.png

Share this post


Link to post
Share on other sites

I've Find the solution about the problem : If he can't find the ajax-loader.gif, create on the root website a folder name "views" inside this folder create an another folder name ''img'' and put inside the file ajax-loader.gif who is usually in the folder module in views/img.

Share this post


Link to post
Share on other sites

Hi i use it on PrestaShop 1.6.1.4 and if i select filtrs in blocklayered then don't work good.

Select but don't have good quality of product.

 

Must add blocklayered.js work with it modules ?

Share this post


Link to post
Share on other sites

Hi,

 

thanks for your module. That works great but for one thing : in list view when i scroll the second page and others are showing as grid...

How can I manage to correct this ?

 

Prestashop 1.6.0.14 - I forced list mode by following Vekia's tutorial here : https://mypresta.eu/en/art/prestashop-16/grid-to-list-products-view.html

 

Thanks for your help.

Jérôme

Share this post


Link to post
Share on other sites

Hi.

Module works well until setup blocklayered or something else...

 

Right now its work like that:

1) If some products add in "home" category via "homefeatured" - Infinite scroll module will load this products in all category. Load several times. Until number of products in that category not end...

2) If no products in "homefeatured" - this module show "no more products", but products exist...

 

What i can do with that?

 

Thx!

Share this post


Link to post
Share on other sites

Hey, 

 

The Ajax-Loading is working fine, but the problem appears with blocklayered filters.

not showing more than one page of products for applied filter.  Please view here http://goo.gl/zyg22q

 

Thanks in advance!

Share this post


Link to post
Share on other sites

Hi,

 

thanks for your module. That works great but for one thing : in list view when i scroll the second page and others are showing as grid...

How can I manage to correct this ?

 

Prestashop 1.6.0.14 - I forced list mode by following Vekia's tutorial here : https://mypresta.eu/en/art/prestashop-16/grid-to-list-products-view.html

 

Thanks for your help.

Jérôme

 

 

hello brother,

 

the same thing happens I want the second page list, which file you modified please module to make it display?
 
Thank you...

Share this post


Link to post
Share on other sites

HI I just followed vekia's tuto and activated the module.  Did you find a solution for second page in grid mode instead of list ?

Share this post


Link to post
Share on other sites

Hey, 

 

The Ajax-Loading is working fine, but the problem appears with blocklayered filters.

not showing more than one page of products for applied filter.  Please view here http://goo.gl/zyg22q

 

Thanks in advance!

Hi Vroon, i have same problem as yours with block layered filters. If i check a filter showing only 3 products (for the exemple), on scroll new products are added on the page. It should be disabled if no more products are available. Any idee ?

Share this post


Link to post
Share on other sites

Any Idea about the compatibility with blocklayered module, I have tried almost all the suggestion mentioned in the thread but no help.
 

Any help welcome!

 

Thanks in advance 

Share this post


Link to post
Share on other sites

Hi,

I have been using the module Version 1.3.1, for a shop build with Prestashop 1.5.6.2

I found a problem when I scroll to a page 2 (or 3 or 4,...) of a product list (page like www.example.com/9-text#/page-2).

When being on a page 2, if I make a right click and display the source code, I realize that this source code is only related to the first page.

And I can also see that the page-2 content is not indexed by Google.

Would you have any idea to solve the matter ?

Thank you in advance for any reply.

Patrick

Share this post


Link to post
Share on other sites

hello,

 

I have install the module on prestashop 1.6 but it dosn't work! i have change the code in blocklayered.js but nothing....

 

Can u please help me with this.

 

Thanks

Share this post


Link to post
Share on other sites

Hi,

I just installed the module on my site http://techflyhosting.com/cammino/ but it doesn't work, the pagination is still the old one. I replaced the code on blocklayered.js, what else should i do? This are the settings in my module, they automatically appeared here, i'm not sure if they apply to my theme.

Any help please?

 

Thanks

Share this post


Link to post
Share on other sites

First of , let me thank you all for sharing this one.

 

I have some issues integrating this one , works as should , but when i select a fiter (ex: that has only one product)  it displays the product duplicated , in first page and second page. (as shown in photo)

 

I think it has to do with blocklayered.js , ps version 1.6.0.9 with leo mobile theme.

 

WEBPAGE

 

 

post-860739-0-04610300-1470135778_thumb.jpg

Share this post


Link to post
Share on other sites

Does anybody know how to work with a manual trigger ?

 

I created a button, which should trigger the loading of new content, but I don't really know how to call the infinite scroll function...

Share this post


Link to post
Share on other sites

ibndawood,

Hi

We have a problem with layered navigation filter. If I select a filter (shoe number eq.) the layered navigation tells me there are 4 products let's say, but the infinite scroll loads all the products.

Can you tell me what to modify so the infinitescroll to show only the selected products?

 

Thank you!

Share this post


Link to post
Share on other sites

I am facing the same issue. It does not work with blocklayered. When a filter option is checked, products keep loading on scroll.

 

If the filter is unchecked products don't load on scroll.

 

Any solutions?

 

Thank you.

Share this post


Link to post
Share on other sites

Is this module still working with Prestashop versions 1.6 and above... Could someone please confirm... I installed it but didn't see any change... 

Share this post


Link to post
Share on other sites