Version Notes
Automatic load next page of current product list.
Support for Magento 1.3 up to 1.7
Download this release
Release Info
Developer | Magento Core Team |
Extension | Strategery_InfiniteScroll2 |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.1.0 to 2.1.1
- app/code/community/Strategery/Infinitescroll2/Helper/Data.php +178 -0
- app/code/community/Strategery/Infinitescroll2/Model/Catalog/Observer.php +133 -0
- app/code/community/Strategery/Infinitescroll2/controllers/JsController.php +29 -0
- app/code/community/Strategery/Infinitescroll2/etc/config.xml +136 -0
- app/code/community/Strategery/Infinitescroll2/etc/system.xml +251 -0
- app/design/frontend/base/default/layout/strategery-infinitescroll2.xml +158 -0
- app/design/frontend/default/default/layout/strategery-infinitescroll2.xml +158 -0
- app/etc/modules/Strategery_Infinitescroll2.xml +28 -0
- js/jquery/infinitescroll2/https.js +12 -0
- package.xml +4 -4
app/code/community/Strategery/Infinitescroll2/Helper/Data.php
ADDED
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* InfiniteScroll2 - Magento Integration
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0),
|
8 |
+
* available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/afl-3.0.php
|
10 |
+
*
|
11 |
+
* @category Strategery
|
12 |
+
* @package Strategery_Infinitescroll2
|
13 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
14 |
+
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
15 |
+
*
|
16 |
+
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
17 |
+
* @link http://gabrielsomoza.com/
|
18 |
+
*
|
19 |
+
* Update 2.0.0
|
20 |
+
* @author Damian A. Pastorini (admin@dwdesigner.com)
|
21 |
+
* @link http://www.dwdesigner.com/
|
22 |
+
*/
|
23 |
+
class Strategery_Infinitescroll2_Helper_Data extends Mage_Core_Helper_Abstract
|
24 |
+
{
|
25 |
+
|
26 |
+
protected $_optionsMap;
|
27 |
+
|
28 |
+
public function __construct()
|
29 |
+
{
|
30 |
+
$this->_optionsMap = array(
|
31 |
+
'loading' => array
|
32 |
+
(
|
33 |
+
'data' => '',
|
34 |
+
'type' => 'object',
|
35 |
+
'sub-items' => array
|
36 |
+
(
|
37 |
+
'finishedMsg'=>array('data' => 'design/done_text', 'type' => 'string'),
|
38 |
+
'img'=>array('data' => 'design/loading_img', 'type' => 'string'),
|
39 |
+
'msgText'=>array('data' => 'design/loading_text', 'type' => 'string'),
|
40 |
+
'selector'=>array('data' => 'selectors/loading', 'type' => 'string-JSIE8FIX'),
|
41 |
+
)
|
42 |
+
),
|
43 |
+
'navSelector' => array('data' => 'selectors/navigation', 'type' => 'string'),
|
44 |
+
'nextSelector' => array('data' => 'selectors/next', 'type' => 'string'),
|
45 |
+
'itemSelector' => array('data' => 'selectors/items', 'type' => 'string'),
|
46 |
+
'debug' => array('data' => 'general/debug', 'type' => 'boolean'),
|
47 |
+
'animate' => array('data' => 'design/animate', 'type' => 'boolean'),
|
48 |
+
'extraScrollPx' => array('data' => 'design/extra_scroll_px', 'type' => 'integer'),
|
49 |
+
'doneText' => array('data' => 'design/done_text', 'type' => 'string'),
|
50 |
+
'bufferPx' => array('data' => 'design/buffer_px', 'type' => 'integer'),
|
51 |
+
'callback' => array('data' => 'callbacks/processed_callback', 'type' => 'function'),
|
52 |
+
'behavior' => array('data' => 'magento', 'type'=>'literal-JSIE8FIX')
|
53 |
+
);
|
54 |
+
}
|
55 |
+
|
56 |
+
public function getConfigData($node)
|
57 |
+
{
|
58 |
+
return Mage::getStoreConfig('infinitescroll2/' . $node);
|
59 |
+
}
|
60 |
+
|
61 |
+
public function getJsConfig($optionsMap=false)
|
62 |
+
{
|
63 |
+
if(!$optionsMap){
|
64 |
+
$optionsMap=$this->_optionsMap;
|
65 |
+
}
|
66 |
+
$result='';
|
67 |
+
foreach ($optionsMap as $jsOption => $config) {
|
68 |
+
$colon=',';
|
69 |
+
$jsIE8Fix=strpos($config['type'],'-JSIE8FIX');
|
70 |
+
if($jsIE8Fix!==false){
|
71 |
+
$colon='';
|
72 |
+
$config['type']=substr($config['type'],0,$jsIE8Fix);
|
73 |
+
}
|
74 |
+
if ($value = $this->getConfigData($config['data']) || $config['type']=='object' || $config['type']=='literal') {
|
75 |
+
switch ($config['type']) {
|
76 |
+
case 'string':
|
77 |
+
$value = '"' . $this->getConfigData($config['data']) . '"'; // wrap in double quotes
|
78 |
+
break;
|
79 |
+
case 'boolean':
|
80 |
+
$value = $value == 1 ? 'true' : 'false';
|
81 |
+
break;
|
82 |
+
case 'object':
|
83 |
+
$value='""';
|
84 |
+
if(is_array($config['sub-items']))
|
85 |
+
{
|
86 |
+
$value="{\n";
|
87 |
+
foreach($config['sub-items'] as $name=>$subItem)
|
88 |
+
{
|
89 |
+
$value .= $this->getJsConfig(array($name=>$subItem));
|
90 |
+
}
|
91 |
+
$value.='}';
|
92 |
+
}
|
93 |
+
break;
|
94 |
+
case 'literal':
|
95 |
+
$value = '"' . $config['data'] . '"';
|
96 |
+
break;
|
97 |
+
default:
|
98 |
+
// nothing
|
99 |
+
}
|
100 |
+
$result .= "'{$jsOption}': {$value}$colon\n";
|
101 |
+
}
|
102 |
+
}
|
103 |
+
return $result;
|
104 |
+
}
|
105 |
+
|
106 |
+
public function isMemoryActive()
|
107 |
+
{
|
108 |
+
return $this->getConfigData('memory/enabled');
|
109 |
+
}
|
110 |
+
|
111 |
+
public function isScrollCall()
|
112 |
+
{
|
113 |
+
$result=false;
|
114 |
+
if(Mage::app()->getRequest()->getParam('scrollCall')==1) {
|
115 |
+
$result=true;
|
116 |
+
}
|
117 |
+
return $result;
|
118 |
+
}
|
119 |
+
|
120 |
+
public function getNextPageNumber()
|
121 |
+
{
|
122 |
+
return Mage::app()->getRequest()->getParam('p');
|
123 |
+
}
|
124 |
+
|
125 |
+
public function isMemoryEnableForEachPage()
|
126 |
+
{
|
127 |
+
return $this->getConfigData('memory/each_page');
|
128 |
+
}
|
129 |
+
|
130 |
+
public function hasMemoryLimit()
|
131 |
+
{
|
132 |
+
$result = false;
|
133 |
+
if($this->getConfigData('memory/limit') && $this->getConfigData('memory/limit')>1) {
|
134 |
+
$result=$this->getConfigData('memory/limit');
|
135 |
+
}
|
136 |
+
return $result;
|
137 |
+
}
|
138 |
+
|
139 |
+
public function getSession()
|
140 |
+
{
|
141 |
+
return Mage::getSingleton("core/session");
|
142 |
+
}
|
143 |
+
|
144 |
+
public function initMemory()
|
145 |
+
{
|
146 |
+
$result = false;
|
147 |
+
if($this->getSession()->setData('infiniteScroll',array())) {
|
148 |
+
$result=true;
|
149 |
+
}
|
150 |
+
return $result;
|
151 |
+
}
|
152 |
+
|
153 |
+
public function saveMemory($pageNumber,$page=false)
|
154 |
+
{
|
155 |
+
$data = $this->getSession()->getData('infiniteScroll');
|
156 |
+
if($page!=false && $this->isMemoryEnableForEachPage()) {
|
157 |
+
$data[$page] = $pageNumber;
|
158 |
+
}
|
159 |
+
else {
|
160 |
+
$data['generic']=$pageNumber;
|
161 |
+
}
|
162 |
+
$this->getSession()->setData('infiniteScroll',$data);
|
163 |
+
}
|
164 |
+
|
165 |
+
public function loadMemory($page=false)
|
166 |
+
{
|
167 |
+
$result = false;
|
168 |
+
$data=$this->getSession()->getData('infiniteScroll');
|
169 |
+
if($page!=false && $this->isMemoryEnableForEachPage()) {
|
170 |
+
$result = $data[$page];
|
171 |
+
}
|
172 |
+
else {
|
173 |
+
$result = $data['generic'];
|
174 |
+
}
|
175 |
+
return $result;
|
176 |
+
}
|
177 |
+
|
178 |
+
}
|
app/code/community/Strategery/Infinitescroll2/Model/Catalog/Observer.php
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* InfiniteScroll2 - Magento Integration
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0),
|
8 |
+
* available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/afl-3.0.php
|
10 |
+
*
|
11 |
+
* @category Strategery
|
12 |
+
* @package Strategery_Infinitescroll2
|
13 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
14 |
+
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
15 |
+
*
|
16 |
+
* @author Damian A. Pastorini (admin@dwdesigner.com)
|
17 |
+
* @link http://www.dwdesigner.com/
|
18 |
+
*/
|
19 |
+
class Strategery_Infinitescroll2_Model_Catalog_Observer
|
20 |
+
{
|
21 |
+
|
22 |
+
public function modifyCollection($observer)
|
23 |
+
{
|
24 |
+
$this->hardReset();
|
25 |
+
$helper = Mage::helper('infinitescroll2');
|
26 |
+
if(Mage::registry('current_category') && $helper->isMemoryActive())
|
27 |
+
{
|
28 |
+
// info:
|
29 |
+
$event = $observer->getEvent();
|
30 |
+
$collection = $event->getCollection();
|
31 |
+
$pageId = Mage::registry('current_category')->getId();
|
32 |
+
$pageByParam = $helper->getNextPageNumber();
|
33 |
+
$lastPageNumber = $collection->getLastPageNumber();
|
34 |
+
// actions:
|
35 |
+
if(!$helper->isScrollCall())
|
36 |
+
{
|
37 |
+
if(!Mage::getSingleton('checkout/session')->getData('recursiveCollection'))
|
38 |
+
{
|
39 |
+
$pageLoaded = $helper->loadMemory($pageId);
|
40 |
+
if($pageLoaded>1)
|
41 |
+
{
|
42 |
+
Mage::getSingleton('checkout/session')->setData('recursiveCollection',true);
|
43 |
+
Mage::getSingleton('checkout/session')->setData('pageLoaded',$pageLoaded);
|
44 |
+
// default page size save:
|
45 |
+
$defaultPageSize = $collection->getPageSize();
|
46 |
+
Mage::getSingleton('checkout/session')->setData('defautlPageSize',$defaultPageSize);
|
47 |
+
// replace page size:
|
48 |
+
$tmpPageSize = $defaultPageSize*$pageLoaded;
|
49 |
+
$collection->setPageSize($tmpPageSize);
|
50 |
+
}
|
51 |
+
else
|
52 |
+
{
|
53 |
+
Mage::getSingleton('checkout/session')->setData('pageLoaded','');
|
54 |
+
Mage::getSingleton('checkout/session')->setData('nextPage','');
|
55 |
+
}
|
56 |
+
}
|
57 |
+
}
|
58 |
+
else
|
59 |
+
{
|
60 |
+
$nextPage = Mage::getSingleton('checkout/session')->getData('nextPage');
|
61 |
+
if($nextPage>1 && $nextPage<=$lastPageNumber)
|
62 |
+
{
|
63 |
+
$pageByParam=$nextPage;
|
64 |
+
}
|
65 |
+
$helper->saveMemory($pageByParam,$pageId);
|
66 |
+
$collection->setCurPage($pageByParam);
|
67 |
+
Mage::getSingleton('checkout/session')->setData('pageLoaded',$pageByParam);
|
68 |
+
}
|
69 |
+
}
|
70 |
+
return $this;
|
71 |
+
}
|
72 |
+
|
73 |
+
public function restoreCollection($observer)
|
74 |
+
{
|
75 |
+
$helper = Mage::helper('infinitescroll2');
|
76 |
+
if(Mage::registry('current_category') && $helper->isMemoryActive())
|
77 |
+
{
|
78 |
+
// info:
|
79 |
+
$helper = Mage::helper('infinitescroll2');
|
80 |
+
$event = $observer->getEvent();
|
81 |
+
$collection = $event->getCollection();
|
82 |
+
$pageLoaded = Mage::getSingleton('checkout/session')->getData('pageLoaded');
|
83 |
+
$nextPageSaved = Mage::getSingleton('checkout/session')->getData('nextPage');
|
84 |
+
$tmpNext = false;
|
85 |
+
// restore page number:
|
86 |
+
$restorePageSize = Mage::getSingleton('checkout/session')->getData('defautlPageSize');
|
87 |
+
$collection->setPageSize($restorePageSize);
|
88 |
+
Mage::getSingleton('checkout/session')->setData('recursiveCollection',false);
|
89 |
+
// last page:
|
90 |
+
$lastPageNumber = $collection->getLastPageNumber();
|
91 |
+
// actions:
|
92 |
+
if(Mage::getSingleton('checkout/session')->getData('recursiveCollection'))
|
93 |
+
{
|
94 |
+
if($pageLoaded>1)
|
95 |
+
{
|
96 |
+
$tmpNext=$pageLoaded+1;
|
97 |
+
if($tmpNext<=$lastPageNumber)
|
98 |
+
{
|
99 |
+
Mage::getSingleton('checkout/session')->setData('nextPage',$tmpNext);
|
100 |
+
}
|
101 |
+
$collection->setCurPage($pageLoaded);
|
102 |
+
}
|
103 |
+
}
|
104 |
+
if(!$tmpNext)
|
105 |
+
{
|
106 |
+
$tmpNext=$pageLoaded+1;
|
107 |
+
}
|
108 |
+
if($helper->isScrollCall() && $nextPageSaved>$lastPageNumber)
|
109 |
+
{
|
110 |
+
die();
|
111 |
+
}
|
112 |
+
if($helper->isScrollCall() && $pageLoaded>1 && $pageLoaded<=$lastPageNumber)
|
113 |
+
{
|
114 |
+
Mage::getSingleton('checkout/session')->setData('nextPage',$tmpNext);
|
115 |
+
}
|
116 |
+
}
|
117 |
+
return $this;
|
118 |
+
}
|
119 |
+
|
120 |
+
public function hardReset()
|
121 |
+
{
|
122 |
+
if(Mage::app()->getRequest()->getParam('resetAll'))
|
123 |
+
{
|
124 |
+
$helper = Mage::helper('infinitescroll2');
|
125 |
+
$helper->getSession()->setData('defautlPageSize','');
|
126 |
+
$helper->getSession()->setData('pageLoaded','');
|
127 |
+
$helper->getSession()->setData('nextPage','');
|
128 |
+
$helper->getSession()->setData('recursiveCollection','');
|
129 |
+
$helper->getSession()->setData('infiniteScroll','');
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
}
|
app/code/community/Strategery/Infinitescroll2/controllers/JsController.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* InfiniteScroll2 - Magento Integration
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0),
|
8 |
+
* available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/afl-3.0.php
|
10 |
+
*
|
11 |
+
* @category Strategery
|
12 |
+
* @package Strategery_Infinitescroll2
|
13 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
14 |
+
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
15 |
+
*
|
16 |
+
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
17 |
+
* @link http://gabrielsomoza.com/
|
18 |
+
*/
|
19 |
+
class Strategery_Infinitescroll2_JsController extends Mage_Core_Controller_Front_Action
|
20 |
+
{
|
21 |
+
|
22 |
+
public function indexAction()
|
23 |
+
{
|
24 |
+
$this->getResponse()->setHeader('Content-Type', 'text/javascript');
|
25 |
+
$this->loadLayout();
|
26 |
+
$this->renderLayout();
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
app/code/community/Strategery/Infinitescroll2/etc/config.xml
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* InfiniteScroll2 - Magento Integration
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0),
|
9 |
+
* available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
*
|
12 |
+
* @category Strategery
|
13 |
+
* @package Strategery_Infinitescroll2
|
14 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
15 |
+
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
16 |
+
*
|
17 |
+
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
18 |
+
* @link http://gabrielsomoza.com/
|
19 |
+
*
|
20 |
+
* Update 2.0.0
|
21 |
+
* @author Damian A. Pastorini (admin@dwdesigner.com)
|
22 |
+
* @link http://www.dwdesigner.com/
|
23 |
+
*/
|
24 |
+
-->
|
25 |
+
<config>
|
26 |
+
<modules>
|
27 |
+
<Strategery_Infinitescroll2>
|
28 |
+
<version>2.1.1</version>
|
29 |
+
</Strategery_Infinitescroll2>
|
30 |
+
</modules>
|
31 |
+
<global>
|
32 |
+
<helpers>
|
33 |
+
<infinitescroll2>
|
34 |
+
<class>Strategery_Infinitescroll2_Helper</class>
|
35 |
+
</infinitescroll2>
|
36 |
+
</helpers>
|
37 |
+
<models>
|
38 |
+
<infinitescroll2>
|
39 |
+
<class>Strategery_Infinitescroll2_Model</class>
|
40 |
+
</infinitescroll2>
|
41 |
+
</models>
|
42 |
+
<events>
|
43 |
+
<catalog_product_collection_load_before>
|
44 |
+
<observers>
|
45 |
+
<infinitescroll2_catalog_observer>
|
46 |
+
<type>singleton</type>
|
47 |
+
<class>Strategery_Infinitescroll2_Model_Catalog_Observer</class>
|
48 |
+
<method>modifyCollection</method>
|
49 |
+
</infinitescroll2_catalog_observer>
|
50 |
+
</observers>
|
51 |
+
</catalog_product_collection_load_before>
|
52 |
+
<catalog_product_collection_load_after>
|
53 |
+
<observers>
|
54 |
+
<infinitescroll2_catalog_observer>
|
55 |
+
<type>singleton</type>
|
56 |
+
<class>Strategery_Infinitescroll2_Model_Catalog_Observer</class>
|
57 |
+
<method>restoreCollection</method>
|
58 |
+
</infinitescroll2_catalog_observer>
|
59 |
+
</observers>
|
60 |
+
</catalog_product_collection_load_after>
|
61 |
+
</events>
|
62 |
+
</global>
|
63 |
+
<frontend>
|
64 |
+
<routers>
|
65 |
+
<infinitescroll2>
|
66 |
+
<use>standard</use>
|
67 |
+
<args>
|
68 |
+
<module>Strategery_Infinitescroll2</module>
|
69 |
+
<frontName>infinitescroll2</frontName>
|
70 |
+
</args>
|
71 |
+
</infinitescroll2>
|
72 |
+
</routers>
|
73 |
+
<layout>
|
74 |
+
<updates>
|
75 |
+
<infinitescroll2>
|
76 |
+
<file>strategery-infinitescroll2.xml</file>
|
77 |
+
</infinitescroll2>
|
78 |
+
</updates>
|
79 |
+
</layout>
|
80 |
+
</frontend>
|
81 |
+
<default>
|
82 |
+
<infinitescroll2>
|
83 |
+
<general>
|
84 |
+
<enabled>1</enabled>
|
85 |
+
<debug>0</debug>
|
86 |
+
</general>
|
87 |
+
<selectors>
|
88 |
+
<content>div.category-products</content>
|
89 |
+
<navigation>div.toolbar:last</navigation>
|
90 |
+
<next>div.pages a.next:first</next>
|
91 |
+
<items>ul.products-grid</items>
|
92 |
+
<loading>div.category-products</loading>
|
93 |
+
</selectors>
|
94 |
+
<design>
|
95 |
+
<loading_img>http://www.infinite-scroll.com/loading.gif</loading_img>
|
96 |
+
<loading_text><![CDATA[<em>Loading the next set of posts...</em>]]></loading_text>
|
97 |
+
<done_text><![CDATA[<em>Congratulations, you've reached the end of the internet.</em>]]></done_text>
|
98 |
+
<hide_toolbar>1</hide_toolbar>
|
99 |
+
<animate>0</animate>
|
100 |
+
<local_mode>0</local_mode>
|
101 |
+
<extra_scroll_px>150</extra_scroll_px>
|
102 |
+
<buffer_px>150</buffer_px>
|
103 |
+
</design>
|
104 |
+
<memory>
|
105 |
+
<enabled>1</enabled>
|
106 |
+
<each_page>0</each_page>
|
107 |
+
<each_page>30</each_page>
|
108 |
+
</memory>
|
109 |
+
<callbacks>
|
110 |
+
<processed_callback><![CDATA[function(elements){decorateGeneric($$('ul.products-grid'),['odd','even','first','last']);}]]></processed_callback>
|
111 |
+
</callbacks>
|
112 |
+
</infinitescroll2>
|
113 |
+
</default>
|
114 |
+
<adminhtml>
|
115 |
+
<acl>
|
116 |
+
<resources>
|
117 |
+
<admin>
|
118 |
+
<children>
|
119 |
+
<system>
|
120 |
+
<children>
|
121 |
+
<config>
|
122 |
+
<children>
|
123 |
+
<infinitescroll2 translate="title" module="infinitescroll2">
|
124 |
+
<title>Infinite Scroll</title>
|
125 |
+
<sort_order>50</sort_order>
|
126 |
+
</infinitescroll2>
|
127 |
+
</children>
|
128 |
+
</config>
|
129 |
+
</children>
|
130 |
+
</system>
|
131 |
+
</children>
|
132 |
+
</admin>
|
133 |
+
</resources>
|
134 |
+
</acl>
|
135 |
+
</adminhtml>
|
136 |
+
</config>
|
app/code/community/Strategery/Infinitescroll2/etc/system.xml
ADDED
@@ -0,0 +1,251 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* InfiniteScroll2 - Magento Integration
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0),
|
9 |
+
* available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
*
|
12 |
+
* @category Strategery
|
13 |
+
* @package Strategery_Infinitescroll2
|
14 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
15 |
+
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
16 |
+
*
|
17 |
+
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
18 |
+
* @link http://gabrielsomoza.com/
|
19 |
+
*
|
20 |
+
* Update 2.0.0
|
21 |
+
* @author Damian A. Pastorini (admin@dwdesigner.com)
|
22 |
+
* @link http://www.dwdesigner.com/
|
23 |
+
*/
|
24 |
+
-->
|
25 |
+
<config>
|
26 |
+
<sections>
|
27 |
+
<infinitescroll2 translate="label" module="infinitescroll2">
|
28 |
+
<label>Infinite Scroll 2</label>
|
29 |
+
<tab>catalog</tab>
|
30 |
+
<frontend_type>text</frontend_type>
|
31 |
+
<sort_order>120</sort_order>
|
32 |
+
<show_in_default>1</show_in_default>
|
33 |
+
<show_in_website>1</show_in_website>
|
34 |
+
<show_in_store>1</show_in_store>
|
35 |
+
<groups>
|
36 |
+
<general translate="label">
|
37 |
+
<label>General</label>
|
38 |
+
<frontend_type>text</frontend_type>
|
39 |
+
<sort_order>1</sort_order>
|
40 |
+
<show_in_default>1</show_in_default>
|
41 |
+
<show_in_website>1</show_in_website>
|
42 |
+
<show_in_store>1</show_in_store>
|
43 |
+
<fields>
|
44 |
+
<enabled>
|
45 |
+
<label>Enabled</label>
|
46 |
+
<frontend_type>select</frontend_type>
|
47 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
48 |
+
<sort_order>0</sort_order>
|
49 |
+
<show_in_default>1</show_in_default>
|
50 |
+
<show_in_website>1</show_in_website>
|
51 |
+
<show_in_store>1</show_in_store>
|
52 |
+
</enabled>
|
53 |
+
<debug>
|
54 |
+
<label>Debug Mode</label>
|
55 |
+
<frontend_type>select</frontend_type>
|
56 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
57 |
+
<sort_order>1</sort_order>
|
58 |
+
<show_in_default>1</show_in_default>
|
59 |
+
<show_in_website>1</show_in_website>
|
60 |
+
<show_in_store>1</show_in_store>
|
61 |
+
</debug>
|
62 |
+
</fields>
|
63 |
+
</general>
|
64 |
+
<selectors translate="label">
|
65 |
+
<label>Selectors</label>
|
66 |
+
<frontend_type>text</frontend_type>
|
67 |
+
<sort_order>2</sort_order>
|
68 |
+
<show_in_default>1</show_in_default>
|
69 |
+
<show_in_website>1</show_in_website>
|
70 |
+
<show_in_store>1</show_in_store>
|
71 |
+
<fields>
|
72 |
+
<content>
|
73 |
+
<label>Content</label>
|
74 |
+
<sort_order>1</sort_order>
|
75 |
+
<show_in_default>1</show_in_default>
|
76 |
+
<show_in_website>1</show_in_website>
|
77 |
+
<show_in_store>1</show_in_store>
|
78 |
+
<comment>Selector for the element that surrounds the items you will be loading more of.</comment>
|
79 |
+
</content>
|
80 |
+
<navigation>
|
81 |
+
<label>Navigation</label>
|
82 |
+
<sort_order>2</sort_order>
|
83 |
+
<show_in_default>1</show_in_default>
|
84 |
+
<show_in_website>1</show_in_website>
|
85 |
+
<show_in_store>1</show_in_store>
|
86 |
+
<comment>Selector for the paged navigation.</comment>
|
87 |
+
</navigation>
|
88 |
+
<next>
|
89 |
+
<label>Next</label>
|
90 |
+
<sort_order>3</sort_order>
|
91 |
+
<show_in_default>1</show_in_default>
|
92 |
+
<show_in_website>1</show_in_website>
|
93 |
+
<show_in_store>1</show_in_store>
|
94 |
+
<comment>Selector for the link to the next page.</comment>
|
95 |
+
</next>
|
96 |
+
<items>
|
97 |
+
<label>Items</label>
|
98 |
+
<sort_order>4</sort_order>
|
99 |
+
<show_in_default>1</show_in_default>
|
100 |
+
<show_in_website>1</show_in_website>
|
101 |
+
<show_in_store>1</show_in_store>
|
102 |
+
<comment>Selector for all items you'll retrieve.</comment>
|
103 |
+
</items>
|
104 |
+
<loading>
|
105 |
+
<label>Loading</label>
|
106 |
+
<sort_order>5</sort_order>
|
107 |
+
<show_in_default>1</show_in_default>
|
108 |
+
<show_in_website>1</show_in_website>
|
109 |
+
<show_in_store>1</show_in_store>
|
110 |
+
<comment>Selector for loading message and bar.</comment>
|
111 |
+
</loading>
|
112 |
+
</fields>
|
113 |
+
</selectors>
|
114 |
+
<design translate="label">
|
115 |
+
<label>Design</label>
|
116 |
+
<frontend_type>text</frontend_type>
|
117 |
+
<sort_order>3</sort_order>
|
118 |
+
<show_in_default>1</show_in_default>
|
119 |
+
<show_in_website>1</show_in_website>
|
120 |
+
<show_in_store>1</show_in_store>
|
121 |
+
<fields>
|
122 |
+
<loading_img>
|
123 |
+
<label>Loading Image</label>
|
124 |
+
<sort_order>1</sort_order>
|
125 |
+
<show_in_default>1</show_in_default>
|
126 |
+
<show_in_website>1</show_in_website>
|
127 |
+
<show_in_store>1</show_in_store>
|
128 |
+
</loading_img>
|
129 |
+
<loading_text>
|
130 |
+
<label>Loading Text</label>
|
131 |
+
<sort_order>2</sort_order>
|
132 |
+
<show_in_default>1</show_in_default>
|
133 |
+
<show_in_website>1</show_in_website>
|
134 |
+
<show_in_store>1</show_in_store>
|
135 |
+
</loading_text>
|
136 |
+
<done_text>
|
137 |
+
<label>Done Text</label>
|
138 |
+
<sort_order>3</sort_order>
|
139 |
+
<show_in_default>1</show_in_default>
|
140 |
+
<show_in_website>1</show_in_website>
|
141 |
+
<show_in_store>1</show_in_store>
|
142 |
+
</done_text>
|
143 |
+
<animate>
|
144 |
+
<label>Animate</label>
|
145 |
+
<frontend_type>select</frontend_type>
|
146 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
147 |
+
<sort_order>4</sort_order>
|
148 |
+
<show_in_default>1</show_in_default>
|
149 |
+
<show_in_website>1</show_in_website>
|
150 |
+
<show_in_store>1</show_in_store>
|
151 |
+
<comment>Automatically scroll the page when new content loads.</comment>
|
152 |
+
</animate>
|
153 |
+
<hide_toolbar>
|
154 |
+
<label>Hide Toolbar</label>
|
155 |
+
<frontend_type>select</frontend_type>
|
156 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
157 |
+
<sort_order>4</sort_order>
|
158 |
+
<show_in_default>1</show_in_default>
|
159 |
+
<show_in_website>1</show_in_website>
|
160 |
+
<show_in_store>1</show_in_store>
|
161 |
+
</hide_toolbar>
|
162 |
+
<local_mode>
|
163 |
+
<label>Local Mode</label>
|
164 |
+
<frontend_type>select</frontend_type>
|
165 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
166 |
+
<sort_order>5</sort_order>
|
167 |
+
<show_in_default>1</show_in_default>
|
168 |
+
<show_in_website>1</show_in_website>
|
169 |
+
<show_in_store>1</show_in_store>
|
170 |
+
<comment>Instead of watching the entire window scrolling, watch only the element this plugin was called on (set in Selectors->Content).</comment>
|
171 |
+
</local_mode>
|
172 |
+
<extra_scroll_px>
|
173 |
+
<label>Extra Scroll (px)</label>
|
174 |
+
<validate>validate-digits</validate>
|
175 |
+
<sort_order>6</sort_order>
|
176 |
+
<show_in_default>1</show_in_default>
|
177 |
+
<show_in_website>1</show_in_website>
|
178 |
+
<show_in_store>1</show_in_store>
|
179 |
+
<comment>Number of pixels the page will scroll in addition to the height of the loaded DIV. Animate must be 'yes' in order for this to take effect.</comment>
|
180 |
+
</extra_scroll_px>
|
181 |
+
<buffer_px>
|
182 |
+
<label>Buffer (px)</label>
|
183 |
+
<validate>validate-digits</validate>
|
184 |
+
<sort_order>7</sort_order>
|
185 |
+
<show_in_default>1</show_in_default>
|
186 |
+
<show_in_website>1</show_in_website>
|
187 |
+
<show_in_store>1</show_in_store>
|
188 |
+
<comment>Set an offset before page end from which the content will start to load. A high number will load the next page a long time before the user reaches the bottom of the screen.</comment>
|
189 |
+
</buffer_px>
|
190 |
+
</fields>
|
191 |
+
</design>
|
192 |
+
<memory translate="label">
|
193 |
+
<label>Scroll Memory</label>
|
194 |
+
<frontend_type>text</frontend_type>
|
195 |
+
<sort_order>4</sort_order>
|
196 |
+
<show_in_default>1</show_in_default>
|
197 |
+
<show_in_website>1</show_in_website>
|
198 |
+
<show_in_store>1</show_in_store>
|
199 |
+
<fields>
|
200 |
+
<enabled>
|
201 |
+
<label>Active scroll memory?</label>
|
202 |
+
<comment>When you go from the product list to a PDP and then click on the "back" button the product list should load all the products until where the customer had stopped scrolling.</comment>
|
203 |
+
<frontend_type>select</frontend_type>
|
204 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
205 |
+
<sort_order>0</sort_order>
|
206 |
+
<show_in_default>1</show_in_default>
|
207 |
+
<show_in_website>1</show_in_website>
|
208 |
+
<show_in_store>1</show_in_store>
|
209 |
+
</enabled>
|
210 |
+
<each_page>
|
211 |
+
<label>Remember scroll for each product list?</label>
|
212 |
+
<frontend_type>select</frontend_type>
|
213 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
214 |
+
<sort_order>1</sort_order>
|
215 |
+
<show_in_default>1</show_in_default>
|
216 |
+
<show_in_website>1</show_in_website>
|
217 |
+
<show_in_store>1</show_in_store>
|
218 |
+
</each_page>
|
219 |
+
<limit>
|
220 |
+
<label>Limit number of pages to load</label>
|
221 |
+
<frontend_type>text</frontend_type>
|
222 |
+
<sort_order>2</sort_order>
|
223 |
+
<show_in_default>1</show_in_default>
|
224 |
+
<show_in_website>1</show_in_website>
|
225 |
+
<show_in_store>1</show_in_store>
|
226 |
+
</limit>
|
227 |
+
</fields>
|
228 |
+
</memory>
|
229 |
+
<callbacks translate="label">
|
230 |
+
<label>Callbacks</label>
|
231 |
+
<frontend_type>text</frontend_type>
|
232 |
+
<sort_order>5</sort_order>
|
233 |
+
<show_in_default>1</show_in_default>
|
234 |
+
<show_in_website>1</show_in_website>
|
235 |
+
<show_in_store>1</show_in_store>
|
236 |
+
<fields>
|
237 |
+
<processed_callback>
|
238 |
+
<label>Processed Callback</label>
|
239 |
+
<frontend_type>textarea</frontend_type>
|
240 |
+
<sort_order>1</sort_order>
|
241 |
+
<show_in_default>1</show_in_default>
|
242 |
+
<show_in_website>1</show_in_website>
|
243 |
+
<show_in_store>1</show_in_store>
|
244 |
+
<comment><![CDATA[This function will be called right after appending new elements to the container and setting up animations. Default: function(){}]]></comment>
|
245 |
+
</processed_callback>
|
246 |
+
</fields>
|
247 |
+
</callbacks>
|
248 |
+
</groups>
|
249 |
+
</infinitescroll2>
|
250 |
+
</sections>
|
251 |
+
</config>
|
app/design/frontend/base/default/layout/strategery-infinitescroll2.xml
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* InfiniteScroll - Magento Integration
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0),
|
9 |
+
* available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
*
|
12 |
+
* @category Strategery
|
13 |
+
* @package Strategery_Infinitescroll2
|
14 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
15 |
+
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
16 |
+
*
|
17 |
+
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
18 |
+
* @link http://gabrielsomoza.com/
|
19 |
+
*
|
20 |
+
* Update 2.0.0
|
21 |
+
* @author Damian A. Pastorini (admin@dwdesigner.com)
|
22 |
+
* @link http://www.dwdesigner.com/
|
23 |
+
*/
|
24 |
+
-->
|
25 |
+
<layout version="0.1.0">
|
26 |
+
<infinitescroll2_js_index>
|
27 |
+
<reference name="root">
|
28 |
+
<action method="setTemplate" ifconfig="infinitescroll2/general/enabled">
|
29 |
+
<template>strategery/infinitescroll2/js.phtml</template>
|
30 |
+
</action>
|
31 |
+
</reference>
|
32 |
+
</infinitescroll2_js_index>
|
33 |
+
|
34 |
+
<catalog_category_default>
|
35 |
+
<reference name="head">
|
36 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
37 |
+
<type>js</type>
|
38 |
+
<name>jquery/jquery.latest.min.js</name>
|
39 |
+
</action>
|
40 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
41 |
+
<type>js</type>
|
42 |
+
<name>jquery/infinitescroll2/https.js</name>
|
43 |
+
</action>
|
44 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
45 |
+
<type>js</type>
|
46 |
+
<name>jquery/infinitescroll2/jquery.infinitescroll.js</name>
|
47 |
+
</action>
|
48 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
49 |
+
<type>js</type>
|
50 |
+
<name>jquery/infinitescroll2/behaviors/infinitescroll-magento.js</name>
|
51 |
+
</action>
|
52 |
+
</reference>
|
53 |
+
<reference name="before_body_end">
|
54 |
+
<block type="core/text" name="infinitescroll2_config">
|
55 |
+
<action method="setText">
|
56 |
+
<text><![CDATA[<script type="text/javascript" src="/infinitescroll2/js"></script>]]></text>
|
57 |
+
</action>
|
58 |
+
</block>
|
59 |
+
</reference>
|
60 |
+
<reference name="product_list_toolbar">
|
61 |
+
<action method="setTemplate" ifconfig="infinitescroll2/design/hide_toolbar">
|
62 |
+
<template>strategery/infinitescroll2/toolbar.phtml</template>
|
63 |
+
</action>
|
64 |
+
</reference>
|
65 |
+
</catalog_category_default>
|
66 |
+
|
67 |
+
<catalog_category_layered>
|
68 |
+
<reference name="head">
|
69 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
70 |
+
<type>js</type>
|
71 |
+
<name>jquery/jquery.latest.min.js</name>
|
72 |
+
</action>
|
73 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
74 |
+
<type>js</type>
|
75 |
+
<name>jquery/infinitescroll2/https.js</name>
|
76 |
+
</action>
|
77 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
78 |
+
<type>js</type>
|
79 |
+
<name>jquery/infinitescroll2/jquery.infinitescroll.js</name>
|
80 |
+
</action>
|
81 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
82 |
+
<type>js</type>
|
83 |
+
<name>jquery/infinitescroll2/behaviors/infinitescroll-magento.js</name>
|
84 |
+
</action>
|
85 |
+
</reference>
|
86 |
+
<reference name="before_body_end">
|
87 |
+
<block type="core/text" name="infinitescroll2_config">
|
88 |
+
<action method="setText">
|
89 |
+
<text><![CDATA[<script type="text/javascript" src="/infinitescroll2/js"></script>]]></text>
|
90 |
+
</action>
|
91 |
+
</block>
|
92 |
+
</reference>
|
93 |
+
<reference name="product_list_toolbar">
|
94 |
+
<action method="setTemplate" ifconfig="infinitescroll2/design/hide_toolbar">
|
95 |
+
<template>strategery/infinitescroll2/toolbar.phtml</template>
|
96 |
+
</action>
|
97 |
+
</reference>
|
98 |
+
</catalog_category_layered>
|
99 |
+
|
100 |
+
<catalogsearch_result_index>
|
101 |
+
<reference name="head">
|
102 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
103 |
+
<type>js</type>
|
104 |
+
<name>jquery/jquery.latest.min.js</name>
|
105 |
+
</action>
|
106 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
107 |
+
<type>js</type>
|
108 |
+
<name>jquery/infinitescroll2/jquery.infinitescroll.js</name>
|
109 |
+
</action>
|
110 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
111 |
+
<type>js</type>
|
112 |
+
<name>jquery/infinitescroll2/behaviors/infinitescroll-magento.js</name>
|
113 |
+
</action>
|
114 |
+
</reference>
|
115 |
+
<reference name="before_body_end">
|
116 |
+
<block type="core/text" name="infinitescroll2_config">
|
117 |
+
<action method="setText">
|
118 |
+
<text><![CDATA[<script type="text/javascript" src="/infinitescroll2/js"></script>]]></text>
|
119 |
+
</action>
|
120 |
+
</block>
|
121 |
+
</reference>
|
122 |
+
<reference name="product_list_toolbar">
|
123 |
+
<action method="setTemplate" ifconfig="infinitescroll2/design/hide_toolbar">
|
124 |
+
<template>strategery/infinitescroll2/toolbar.phtml</template>
|
125 |
+
</action>
|
126 |
+
</reference>
|
127 |
+
</catalogsearch_result_index>
|
128 |
+
|
129 |
+
<catalogsearch_advanced_index>
|
130 |
+
<reference name="head">
|
131 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
132 |
+
<type>js</type>
|
133 |
+
<name>jquery/jquery.latest.min.js</name>
|
134 |
+
</action>
|
135 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
136 |
+
<type>js</type>
|
137 |
+
<name>jquery/infinitescroll2/jquery.infinitescroll.js</name>
|
138 |
+
</action>
|
139 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
140 |
+
<type>js</type>
|
141 |
+
<name>jquery/infinitescroll2/behaviors/infinitescroll-magento.js</name>
|
142 |
+
</action>
|
143 |
+
</reference>
|
144 |
+
<reference name="before_body_end">
|
145 |
+
<block type="core/text" name="infinitescroll2_config">
|
146 |
+
<action method="setText">
|
147 |
+
<text><![CDATA[<script type="text/javascript" src="/infinitescroll2/js"></script>]]></text>
|
148 |
+
</action>
|
149 |
+
</block>
|
150 |
+
</reference>
|
151 |
+
<reference name="product_list_toolbar">
|
152 |
+
<action method="setTemplate" ifconfig="infinitescroll2/design/hide_toolbar">
|
153 |
+
<template>strategery/infinitescroll2/toolbar.phtml</template>
|
154 |
+
</action>
|
155 |
+
</reference>
|
156 |
+
</catalogsearch_advanced_index>
|
157 |
+
|
158 |
+
</layout>
|
app/design/frontend/default/default/layout/strategery-infinitescroll2.xml
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* InfiniteScroll - Magento Integration
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0),
|
9 |
+
* available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
*
|
12 |
+
* @category Strategery
|
13 |
+
* @package Strategery_Infinitescroll2
|
14 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
15 |
+
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
16 |
+
*
|
17 |
+
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
18 |
+
* @link http://gabrielsomoza.com/
|
19 |
+
*
|
20 |
+
* Update 2.0.0
|
21 |
+
* @author Damian A. Pastorini (admin@dwdesigner.com)
|
22 |
+
* @link http://www.dwdesigner.com/
|
23 |
+
*/
|
24 |
+
-->
|
25 |
+
<layout version="0.1.0">
|
26 |
+
<infinitescroll2_js_index>
|
27 |
+
<reference name="root">
|
28 |
+
<action method="setTemplate" ifconfig="infinitescroll2/general/enabled">
|
29 |
+
<template>strategery/infinitescroll2/js.phtml</template>
|
30 |
+
</action>
|
31 |
+
</reference>
|
32 |
+
</infinitescroll2_js_index>
|
33 |
+
|
34 |
+
<catalog_category_default>
|
35 |
+
<reference name="head">
|
36 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
37 |
+
<type>js</type>
|
38 |
+
<name>jquery/jquery.latest.min.js</name>
|
39 |
+
</action>
|
40 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
41 |
+
<type>js</type>
|
42 |
+
<name>jquery/infinitescroll2/https.js</name>
|
43 |
+
</action>
|
44 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
45 |
+
<type>js</type>
|
46 |
+
<name>jquery/infinitescroll2/jquery.infinitescroll.js</name>
|
47 |
+
</action>
|
48 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
49 |
+
<type>js</type>
|
50 |
+
<name>jquery/infinitescroll2/behaviors/infinitescroll-magento.js</name>
|
51 |
+
</action>
|
52 |
+
</reference>
|
53 |
+
<reference name="before_body_end">
|
54 |
+
<block type="core/text" name="infinitescroll2_config">
|
55 |
+
<action method="setText">
|
56 |
+
<text><![CDATA[<script type="text/javascript" src="/infinitescroll2/js"></script>]]></text>
|
57 |
+
</action>
|
58 |
+
</block>
|
59 |
+
</reference>
|
60 |
+
<reference name="product_list_toolbar">
|
61 |
+
<action method="setTemplate" ifconfig="infinitescroll2/design/hide_toolbar">
|
62 |
+
<template>strategery/infinitescroll2/toolbar.phtml</template>
|
63 |
+
</action>
|
64 |
+
</reference>
|
65 |
+
</catalog_category_default>
|
66 |
+
|
67 |
+
<catalog_category_layered>
|
68 |
+
<reference name="head">
|
69 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
70 |
+
<type>js</type>
|
71 |
+
<name>jquery/jquery.latest.min.js</name>
|
72 |
+
</action>
|
73 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
74 |
+
<type>js</type>
|
75 |
+
<name>jquery/infinitescroll2/https.js</name>
|
76 |
+
</action>
|
77 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
78 |
+
<type>js</type>
|
79 |
+
<name>jquery/infinitescroll2/jquery.infinitescroll.js</name>
|
80 |
+
</action>
|
81 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
82 |
+
<type>js</type>
|
83 |
+
<name>jquery/infinitescroll2/behaviors/infinitescroll-magento.js</name>
|
84 |
+
</action>
|
85 |
+
</reference>
|
86 |
+
<reference name="before_body_end">
|
87 |
+
<block type="core/text" name="infinitescroll2_config">
|
88 |
+
<action method="setText">
|
89 |
+
<text><![CDATA[<script type="text/javascript" src="/infinitescroll2/js"></script>]]></text>
|
90 |
+
</action>
|
91 |
+
</block>
|
92 |
+
</reference>
|
93 |
+
<reference name="product_list_toolbar">
|
94 |
+
<action method="setTemplate" ifconfig="infinitescroll2/design/hide_toolbar">
|
95 |
+
<template>strategery/infinitescroll2/toolbar.phtml</template>
|
96 |
+
</action>
|
97 |
+
</reference>
|
98 |
+
</catalog_category_layered>
|
99 |
+
|
100 |
+
<catalogsearch_result_index>
|
101 |
+
<reference name="head">
|
102 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
103 |
+
<type>js</type>
|
104 |
+
<name>jquery/jquery.latest.min.js</name>
|
105 |
+
</action>
|
106 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
107 |
+
<type>js</type>
|
108 |
+
<name>jquery/infinitescroll2/jquery.infinitescroll.js</name>
|
109 |
+
</action>
|
110 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
111 |
+
<type>js</type>
|
112 |
+
<name>jquery/infinitescroll2/behaviors/infinitescroll-magento.js</name>
|
113 |
+
</action>
|
114 |
+
</reference>
|
115 |
+
<reference name="before_body_end">
|
116 |
+
<block type="core/text" name="infinitescroll2_config">
|
117 |
+
<action method="setText">
|
118 |
+
<text><![CDATA[<script type="text/javascript" src="/infinitescroll2/js"></script>]]></text>
|
119 |
+
</action>
|
120 |
+
</block>
|
121 |
+
</reference>
|
122 |
+
<reference name="product_list_toolbar">
|
123 |
+
<action method="setTemplate" ifconfig="infinitescroll2/design/hide_toolbar">
|
124 |
+
<template>strategery/infinitescroll2/toolbar.phtml</template>
|
125 |
+
</action>
|
126 |
+
</reference>
|
127 |
+
</catalogsearch_result_index>
|
128 |
+
|
129 |
+
<catalogsearch_advanced_index>
|
130 |
+
<reference name="head">
|
131 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
132 |
+
<type>js</type>
|
133 |
+
<name>jquery/jquery.latest.min.js</name>
|
134 |
+
</action>
|
135 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
136 |
+
<type>js</type>
|
137 |
+
<name>jquery/infinitescroll2/jquery.infinitescroll.js</name>
|
138 |
+
</action>
|
139 |
+
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
140 |
+
<type>js</type>
|
141 |
+
<name>jquery/infinitescroll2/behaviors/infinitescroll-magento.js</name>
|
142 |
+
</action>
|
143 |
+
</reference>
|
144 |
+
<reference name="before_body_end">
|
145 |
+
<block type="core/text" name="infinitescroll2_config">
|
146 |
+
<action method="setText">
|
147 |
+
<text><![CDATA[<script type="text/javascript" src="/infinitescroll2/js"></script>]]></text>
|
148 |
+
</action>
|
149 |
+
</block>
|
150 |
+
</reference>
|
151 |
+
<reference name="product_list_toolbar">
|
152 |
+
<action method="setTemplate" ifconfig="infinitescroll2/design/hide_toolbar">
|
153 |
+
<template>strategery/infinitescroll2/toolbar.phtml</template>
|
154 |
+
</action>
|
155 |
+
</reference>
|
156 |
+
</catalogsearch_advanced_index>
|
157 |
+
|
158 |
+
</layout>
|
app/etc/modules/Strategery_Infinitescroll2.xml
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/*
|
4 |
+
* InfiniteScroll - Magento Integration
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0),
|
9 |
+
* available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
*
|
12 |
+
* @category Strategery
|
13 |
+
* @package Strategery_Infinitescroll2
|
14 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
15 |
+
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
16 |
+
*
|
17 |
+
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
18 |
+
* @link http://gabrielsomoza.com/
|
19 |
+
*/
|
20 |
+
-->
|
21 |
+
<config>
|
22 |
+
<modules>
|
23 |
+
<Strategery_Infinitescroll2>
|
24 |
+
<codePool>community</codePool>
|
25 |
+
<active>true</active>
|
26 |
+
</Strategery_Infinitescroll2>
|
27 |
+
</modules>
|
28 |
+
</config>
|
js/jquery/infinitescroll2/https.js
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
if("https:" == document.location.protocol)
|
2 |
+
{
|
3 |
+
var child;
|
4 |
+
jQuery('.pages ol li').each(function(index)
|
5 |
+
{
|
6 |
+
child = jQuery(this).children().first();
|
7 |
+
if(child.attr('href'))
|
8 |
+
{
|
9 |
+
child.attr('href',child.attr('href').replace('http://','https://'));
|
10 |
+
}
|
11 |
+
});
|
12 |
+
}
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Strategery_InfiniteScroll2</name>
|
4 |
-
<version>2.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/afl-3.0.php">Academic Free License (AFL 3.0)</license>
|
7 |
<channel>community</channel>
|
@@ -22,9 +22,9 @@ System / Configuration / Catalog / Infinite Scroll.</description>
|
|
22 |
<notes>Automatic load next page of current product list.
|
23 |
Support for Magento 1.3 up to 1.7</notes>
|
24 |
<authors><author><name>Damian Alberto Pastorini</name><user>auto-converted</user><email>damian.pastorini@usestrategery.com</email></author></authors>
|
25 |
-
<date>2012-
|
26 |
-
<time>
|
27 |
-
<contents><target name="mageetc"><dir name="modules"><file name="
|
28 |
<compatible/>
|
29 |
<dependencies/>
|
30 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Strategery_InfiniteScroll2</name>
|
4 |
+
<version>2.1.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/afl-3.0.php">Academic Free License (AFL 3.0)</license>
|
7 |
<channel>community</channel>
|
22 |
<notes>Automatic load next page of current product list.
|
23 |
Support for Magento 1.3 up to 1.7</notes>
|
24 |
<authors><author><name>Damian Alberto Pastorini</name><user>auto-converted</user><email>damian.pastorini@usestrategery.com</email></author></authors>
|
25 |
+
<date>2012-07-16</date>
|
26 |
+
<time>11:28:17</time>
|
27 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Strategery_Infinitescroll2.xml" hash="8724cb82b6d47b9996610029e302e5d4"/></dir></target><target name="magecommunity"><dir name="Strategery"><dir name="Infinitescroll2"><dir name="Helper"><file name="Data.php" hash="5690979b341d6877b80192ffebfb2a0b"/></dir><dir name="Model"><dir name="Catalog"><file name="Observer.php" hash="fcc920e038096a630ad4f784f63bab1d"/></dir></dir><dir name="controllers"><file name="JsController.php" hash="3d97abe7a35b69bb70e6bb3ab1414f47"/></dir><dir name="etc"><file name="config.xml" hash="8d4db2acf34c38ecd212d060813219e6"/><file name="system.xml" hash="96e002433cdd53e932ef84fd016e607f"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="strategery-infinitescroll2.xml" hash="03bd0db6aec27c180dc88d5a4aa08942"/></dir><dir name="template"><dir name="strategery"><dir name="infinitescroll2"><file name="js.phtml" hash="e45eb017f11a203291c8c1a66eb7f606"/><file name="toolbar.phtml" hash="d16882d540e2c23501f84a64e33c67e2"/></dir></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="layout"><file name="strategery-infinitescroll2.xml" hash="03bd0db6aec27c180dc88d5a4aa08942"/></dir><dir name="template"><dir name="strategery"><dir name="infinitescroll2"><file name="js.phtml" hash="e45eb017f11a203291c8c1a66eb7f606"/><file name="toolbar.phtml" hash="d16882d540e2c23501f84a64e33c67e2"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="jquery"><dir name="infinitescroll2"><dir name="behaviors"><file name="infinitescroll-magento.js" hash="de9f632d8480e67a36f884aa79d08949"/></dir><file name="https.js" hash="be476c35fecb93b0a88625d8bc8a128b"/><file name="jquery.infinitescroll.js" hash="50dd89bf91ee4a0eb886826cf8bbf319"/><file name="jquery.infinitescroll.min.js" hash="7cb38aca89caf614b2c3894f01d19727"/></dir><file name="jquery.latest.min.js" hash="7ffe78e450bedfa8878241c3abc5edba"/></dir></dir></target></contents>
|
28 |
<compatible/>
|
29 |
<dependencies/>
|
30 |
</package>
|