1

My design requirement is to show latest products on homepage with infinite scroll. During my search for the solution, i checked this article so i first of all installed Strategy Infinity scroll, and then showed products on homepage with pagination following this tutorial. This seem not to be working.

When i showed products on homepage with pagination, there doesn't appear the ajax loader, indicating that on homepage infinite scroll plugin isn't taking any effect. I've carefully added in Layout Update XML field under Design Tab with the following:

  <reference name="head">
  <action method="addItem" ifconfig="infinitescroll2/general/enabled">
    <type>js</type>
    <name>jquery/jquery.latest.min.js</name>
  </action>
  <action method="addItem" ifconfig="infinitescroll2/general/enabled">
    <type>js</type>
    <name>jquery/infinitescroll2/jquery.infinitescroll.js</name>
  </action>
  <action method="addItem" ifconfig="infinitescroll2/general/enabled">
    <type>js</type>
    <name>jquery/infinitescroll2/behaviors/infinitescroll-magento.js</name>
  </action>
  </reference>

But still these javascript files were not included in homepage's source codes. Which indicate that this condition didn't met (only on homepage):

ifconfig="infinitescroll2/general/enabled"

However when I deleted this condition in xml to include the files anyway, the js files got included, but desired functionality didn't occur.

Can someone point out what could be the problem.

19
  • 1
    why you had deleted the previous question? can you put the code from infinitescroll-magento.js if its not too long Commented Mar 28, 2014 at 12:28
  • I edited the previous question too much that whole scope of it changed. That's why deleted that. There is no such file infinitescroll-magento,js. There file included are jquery.infinitescroll.js and jquery.infinitescroll.min.js Commented Mar 28, 2014 at 12:40
  • there would be a script which will initiate the infinitescroll js. Commented Mar 28, 2014 at 13:01
  • Hmm... where could i look for that? Commented Mar 28, 2014 at 13:02
  • the module supposed to have a template file or there could be a js file. without that it might not make sense that your scroll will work. Commented Mar 28, 2014 at 13:07

2 Answers 2

1

The module infinite scroll seems to be developed for

  1. Grid/List mode
  2. Layer model
  3. Search
  4. Advance Search

As you can see in you system > config > Infinite Scroll > Instances(group).
In order to meet your expectation for the homepage you may need to extend this module for the home page.

0

The solution I found to make it work on a homepage was to add this to Layout Update XML in the Design tab for the individual CMS page. It's taken from the strategery-infinitescroll.xml page:

 <reference name="before_body_end">
        <block type="infinitescroll/init" name="infinitescroll_init">
            <action method="setTemplate">
                <template>strategery/infinitescroll/init.phtml</template>
            </action>
        </block>
    </reference>

Also, if you are trying to infinite load a product list on a cms page you also need to follow the instructions shown here (David Perlman's answer):

https://stackoverflow.com/questions/7555157/show-pagination-links-for-product-list-on-a-magento-cms-page/7916665#7916665

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.