Strategery_InfiniteScroll2 - Version 3.5.3

Version Notes

- Refactor for Marketplace migration.

Download this release

Release Info

Developer Strategery
Extension Strategery_InfiniteScroll2
Version 3.5.3
Comparing to
See all releases


Code changes from version 3.5.2 to 3.5.3

app/code/community/Strategery/Infinitescroll/Block/Init.php CHANGED
@@ -1,83 +1,90 @@
1
- <?php
2
- /**
3
- * InfiniteScroll - 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_Infinitescroll
13
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
14
- * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
15
- *
16
- * @author Enrique Piatti
17
- */
18
- class Strategery_Infinitescroll_Block_Init extends Mage_Core_Block_Template
19
- {
20
-
21
- public function getConfigData()
22
- {
23
- $helper = Mage::helper('infinitescroll');
24
- $cache = Mage::app()->getCache();
25
- $configData = $cache->load("infinitescroll_configData");
26
- if ( ! $configData) {
27
- $configData = $helper->getConfigData('selectors/content');
28
- $cache->save($configData, "infinitescroll_configData", array("infinitescroll"));
29
- }
30
- return $configData;
31
- }
32
-
33
- public function isEnabled()
34
- {
35
- return Mage::helper('infinitescroll')->isEnabledInCurrentPage();
36
- }
37
-
38
- /**
39
- * @return bool|false
40
- */
41
- public function getLoaderImage()
42
- {
43
- $url = Mage::helper('infinitescroll')->getConfigData('design/loading_img');
44
- if(!empty($url)) {
45
- $url = strpos($url, 'http') === 0 ? $url : $this->getSkinUrl($url);
46
- }
47
- return empty($url) ? false : $url;
48
- }
49
-
50
- public function getProductListMode()
51
- {
52
- // user mode
53
- $currentMode = $this->getRequest()->getParam('mode') ? $this->getRequest()->getParam('mode') : Mage::getSingleton('catalog/session')->getDisplayMode();
54
- if ($currentMode) {
55
- switch($currentMode){
56
- case 'grid':
57
- $productListMode = 'grid';
58
- break;
59
- case 'list':
60
- $productListMode = 'list';
61
- break;
62
- default:
63
- $productListMode = 'grid';
64
- }
65
- }
66
- else {
67
- $defaultMode = Mage::getStoreConfig('catalog/frontend/list_mode');
68
- switch($defaultMode){
69
- case 'grid-list':
70
- $productListMode = 'grid';
71
- break;
72
- case 'list-grid':
73
- $productListMode = 'list';
74
- break;
75
- default:
76
- $productListMode = $defaultMode;
77
- }
78
- }
79
-
80
- return $productListMode;
81
- }
82
-
83
- }
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * InfiniteScroll - 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_Infinitescroll
13
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
14
+ * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
15
+ *
16
+ * @author Gabriel Somoza (gabriel@strategery.io)
17
+ * @link https://strategery.io
18
+ *
19
+ * @author Damian A. Pastorini (damian.pastorini@strategery.io)
20
+ *
21
+ */
22
+ class Strategery_Infinitescroll_Block_Init extends Mage_Core_Block_Template
23
+ {
24
+
25
+ public function getConfigData()
26
+ {
27
+ $helper = Mage::helper('infinitescroll');
28
+ $cache = Mage::app()->getCache();
29
+ $configData = $cache->load("infinitescroll_configData");
30
+ if (!$configData) {
31
+ $configData = $helper->getConfigData('selectors/content');
32
+ $cache->save($configData, "infinitescroll_configData", array("infinitescroll"));
33
+ }
34
+
35
+ return $configData;
36
+ }
37
+
38
+ public function isEnabled()
39
+ {
40
+ return Mage::helper('infinitescroll')->isEnabledInCurrentPage();
41
+ }
42
+
43
+ /**
44
+ * @return bool|false
45
+ */
46
+ public function getLoaderImage()
47
+ {
48
+ $url = Mage::helper('infinitescroll')->getConfigData('design/loading_img');
49
+ if (!empty($url)) {
50
+ $url = strpos($url, 'http') === 0 ? $url : $this->getSkinUrl($url);
51
+ }
52
+
53
+ return empty($url) ? false : $url;
54
+ }
55
+
56
+ public function getProductListMode()
57
+ {
58
+ $modeParam = $this->getRequest()->getParam('mode', false);
59
+ $displayMode = Mage::getSingleton('catalog/session')->getDisplayMode();
60
+ // user mode
61
+ $currentMode = $modeParam ? $modeParam : $displayMode;
62
+ if ($currentMode) {
63
+ switch ($currentMode) {
64
+ case 'grid':
65
+ $productListMode = 'grid';
66
+ break;
67
+ case 'list':
68
+ $productListMode = 'list';
69
+ break;
70
+ default:
71
+ $productListMode = 'grid';
72
+ }
73
+ } else {
74
+ $defaultMode = Mage::getStoreConfig('catalog/frontend/list_mode');
75
+ switch ($defaultMode) {
76
+ case 'grid-list':
77
+ $productListMode = 'grid';
78
+ break;
79
+ case 'list-grid':
80
+ $productListMode = 'list';
81
+ break;
82
+ default:
83
+ $productListMode = $defaultMode;
84
+ }
85
+ }
86
+
87
+ return $productListMode;
88
+ }
89
+
90
+ }
app/code/community/Strategery/Infinitescroll/Helper/Data.php CHANGED
@@ -1,99 +1,105 @@
1
- <?php
2
- /**
3
- * InfiniteScroll - 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_Infinitescroll
13
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
14
- * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
15
- *
16
- * @author Gabriel Somoza (me@gabrielsomoza.com)
17
- * @link http://gabrielsomoza.com/
18
- *
19
- * @author Damian A. Pastorini (damian.pastorini@dwdeveloper.com)
20
- * @link http://www.dwdeveloper.com/
21
- */
22
- class Strategery_Infinitescroll_Helper_Data extends Mage_Core_Helper_Abstract
23
- {
24
-
25
- protected $_optionsMap;
26
-
27
-
28
- public function getConfigData($node)
29
- {
30
- return Mage::getStoreConfig('infinitescroll/' . $node);
31
- }
32
-
33
- public function isMemoryActive()
34
- {
35
- return $this->getConfigData('memory/enabled');
36
- }
37
-
38
- // public function isScrollCall()
39
- // {
40
- // $result=false;
41
- // if(Mage::app()->getRequest()->getParam('scrollCall')==1) {
42
- // $result=true;
43
- // }
44
- // return $result;
45
- // }
46
-
47
- public function getNextPageNumber()
48
- {
49
- return Mage::app()->getRequest()->getParam('p');
50
- }
51
-
52
- public function getSession()
53
- {
54
- return Mage::getSingleton("core/session");
55
- }
56
-
57
-
58
-
59
- public function isEnabled()
60
- {
61
- return Mage::getStoreConfig('infinitescroll/general/enabled');
62
- }
63
-
64
-
65
- public function getCurrentPageType()
66
- {
67
- // TODO: we could do this with the full path to the request directly
68
- $where = 'grid';
69
- /** @var Mage_Catalog_Model_Category $currentCategory */
70
- $currentCategory = Mage::registry('current_category');
71
- if ($currentCategory) {
72
- $where = "grid";
73
- if($currentCategory->getIsAnchor()){
74
- $where = "layer";
75
- }
76
- }
77
- $controller = Mage::app()->getRequest()->getControllerName();
78
- if ( $controller == "result"){ $where = "search"; }
79
- else if ( $controller == "advanced") { $where = "advanced"; }
80
- return $where;
81
- }
82
-
83
- /**
84
- * check general and instance enable
85
- * @return bool
86
- */
87
- public function isEnabledInCurrentPage()
88
- {
89
- $pageType = $this->getCurrentPageType();
90
- return $this->isEnabled() && Mage::getStoreConfig('infinitescroll/instances/'.$pageType);
91
- }
92
-
93
- // public function getSizeLimitForCurrentPage()
94
- // {
95
- // $pageType = $this->getCurrentPageType();
96
- // return Mage::getStoreConfig('infinitescroll/instances/size_'.$pageType.'');
97
- // }
98
-
99
- }
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * InfiniteScroll - 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_Infinitescroll
13
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
14
+ * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
15
+ *
16
+ * @author Gabriel Somoza (gabriel@strategery.io)
17
+ * @link https://strategery.io
18
+ *
19
+ * @author Damian A. Pastorini (damian.pastorini@strategery.io)
20
+ *
21
+ */
22
+ class Strategery_Infinitescroll_Helper_Data extends Mage_Core_Helper_Abstract
23
+ {
24
+
25
+ protected $_optionsMap;
26
+
27
+ /**
28
+ * @param $node
29
+ * @return mixed
30
+ */
31
+ public function getConfigData($node)
32
+ {
33
+ return Mage::getStoreConfig('infinitescroll/' . $node);
34
+ }
35
+
36
+ /**
37
+ * @return mixed
38
+ */
39
+ public function isMemoryActive()
40
+ {
41
+ return $this->getConfigData('memory/enabled');
42
+ }
43
+
44
+ /**
45
+ * @return mixed
46
+ */
47
+ public function getNextPageNumber()
48
+ {
49
+ return Mage::app()->getRequest()->getParam('p');
50
+ }
51
+
52
+ /**
53
+ * @return mixed
54
+ */
55
+ public function getSession()
56
+ {
57
+ return Mage::getSingleton("core/session");
58
+ }
59
+
60
+ /**
61
+ * @return mixed
62
+ */
63
+ public function isEnabled()
64
+ {
65
+ return Mage::getStoreConfig('infinitescroll/general/enabled');
66
+ }
67
+
68
+ /**
69
+ * @return string
70
+ */
71
+ public function getCurrentPageType()
72
+ {
73
+ $where = 'grid';
74
+ /** @var Mage_Catalog_Model_Category $currentCategory */
75
+ $currentCategory = Mage::registry('current_category');
76
+ if ($currentCategory) {
77
+ $where = "grid";
78
+ if ($currentCategory->getIsAnchor()) {
79
+ $where = "layer";
80
+ }
81
+ }
82
+
83
+ $controller = Mage::app()->getRequest()->getControllerName();
84
+ if ($controller == "result") {
85
+ $where = "search";
86
+ } else if ($controller == "advanced") {
87
+ $where = "advanced";
88
+ }
89
+
90
+ return $where;
91
+ }
92
+
93
+ /**
94
+ *
95
+ * Check general and instance enable.
96
+ *
97
+ * @return bool
98
+ */
99
+ public function isEnabledInCurrentPage()
100
+ {
101
+ $pageType = $this->getCurrentPageType();
102
+ return $this->isEnabled() && Mage::getStoreConfig('infinitescroll/instances/'.$pageType);
103
+ }
104
+
105
+ }
app/code/community/Strategery/Infinitescroll/Model/Admin/Feed.php CHANGED
@@ -1,51 +1,47 @@
1
- <?php
2
- /**
3
- * InfiniteScroll - 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_Infinitescroll
13
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
14
- * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
15
- *
16
- * @author Gabriel Somoza (me@gabrielsomoza.com)
17
- * @link http://gabrielsomoza.com/
18
- *
19
- * @author Enrique Piatti (contacto@enriquepiatti.com)
20
- * @link http://www.dwdesigner.com/
21
- */
22
- class Strategery_Infinitescroll_Model_Admin_Feed extends Mage_AdminNotification_Model_Feed
23
- {
24
-
25
- const FEED_URL = 'usestrategery.com/infinite_scroll/feed/';
26
-
27
- public function getFeedUrl()
28
- {
29
- if (is_null($this->_feedUrl)) {
30
- // $this->_feedUrl = (Mage::getStoreConfigFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://')
31
- // . self::FEED_URL;
32
-
33
- $this->_feedUrl = 'http://'.self::FEED_URL;
34
-
35
- }
36
- return $this->_feedUrl;
37
- }
38
-
39
- public function getLastUpdate()
40
- {
41
- return Mage::app()->loadCache('infinitescroll_notifications_lastcheck');
42
- }
43
-
44
- public function setLastUpdate()
45
- {
46
- Mage::app()->saveCache(time(), 'infinitescroll_notifications_lastcheck');
47
- return $this;
48
- }
49
-
50
-
51
- }
1
+ <?php
2
+ /**
3
+ * InfiniteScroll - 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_Infinitescroll
13
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
14
+ * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
15
+ *
16
+ * @author Gabriel Somoza (gabriel@strategery.io)
17
+ * @link https://strategery.io
18
+ *
19
+ * @author Damian A. Pastorini (damian.pastorini@strategery.io)
20
+ *
21
+ */
22
+ class Strategery_Infinitescroll_Model_Admin_Feed extends Mage_AdminNotification_Model_Feed
23
+ {
24
+
25
+ const FEED_URL = 'strategery.io/infinite_scroll/feed/';
26
+
27
+ public function getFeedUrl()
28
+ {
29
+ if ($this->_feedUrl === null) {
30
+ $this->_feedUrl = 'http://'.self::FEED_URL;
31
+ }
32
+
33
+ return $this->_feedUrl;
34
+ }
35
+
36
+ public function getLastUpdate()
37
+ {
38
+ return Mage::app()->loadCache('infinitescroll_notifications_lastcheck');
39
+ }
40
+
41
+ public function setLastUpdate()
42
+ {
43
+ Mage::app()->saveCache(time(), 'infinitescroll_notifications_lastcheck');
44
+ return $this;
45
+ }
46
+
47
+ }
 
 
 
 
app/code/community/Strategery/Infinitescroll/Model/Observer.php CHANGED
@@ -1,31 +1,34 @@
1
- <?php
2
- /**
3
- * InfiniteScroll - 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_Infinitescroll
13
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
14
- * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
15
- *
16
- * @author Gabriel Somoza (me@gabrielsomoza.com)
17
- * @link http://gabrielsomoza.com/
18
- *
19
- * @author Enrique Piatti (contacto@enriquepiatti.com)
20
- * @link http://www.dwdesigner.com/
21
- */
22
- class Strategery_Infinitescroll_Model_Observer {
23
-
24
- public function controllerActionPredispatch($event)
25
- {
26
- if (Mage::getSingleton('admin/session')->isLoggedIn()) {
27
- $feedModel = Mage::getModel('infinitescroll/admin_feed');
28
- $feedModel->checkUpdate();
29
- }
30
- }
31
- }
 
 
 
1
+ <?php
2
+ /**
3
+ * InfiniteScroll - 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_Infinitescroll
13
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
14
+ * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
15
+ *
16
+ * @author Gabriel Somoza (gabriel@strategery.io)
17
+ * @link https://strategery.io
18
+ *
19
+ * @author Damian A. Pastorini (damian.pastorini@strategery.io)
20
+ *
21
+ */
22
+ class Strategery_Infinitescroll_Model_Observer
23
+ {
24
+
25
+ public function controllerActionPredispatch($event)
26
+ {
27
+ if (Mage::getSingleton('admin/session')->isLoggedIn()) {
28
+ $feedModel = Mage::getModel('infinitescroll/admin_feed');
29
+ $feedModel->checkUpdate();
30
+ }
31
+
32
+ }
33
+
34
+ }
app/code/community/Strategery/Infinitescroll/etc/adminhtml.xml CHANGED
@@ -14,11 +14,11 @@
14
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
15
  * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
16
  *
17
- * @author Gabriel Somoza (me@gabrielsomoza.com)
18
- * @link http://gabrielsomoza.com/
 
 
19
  *
20
- * @author Damian A. Pastorini (damian.pastorini@dwdeveloper.com)
21
- * @link http://www.dwdeveloper.com/
22
  */
23
  -->
24
  <config>
14
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
15
  * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
16
  *
17
+ * @author Gabriel Somoza (gabriel@strategery.io)
18
+ * @link https://strategery.io
19
+ *
20
+ * @author Damian A. Pastorini (damian.pastorini@strategery.io)
21
  *
 
 
22
  */
23
  -->
24
  <config>
app/code/community/Strategery/Infinitescroll/etc/config.xml CHANGED
@@ -14,17 +14,17 @@
14
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
15
  * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
16
  *
17
- * @author Gabriel Somoza (me@gabrielsomoza.com)
18
- * @link http://gabrielsomoza.com/
 
 
19
  *
20
- * @author Damian A. Pastorini (damian.pastorini@dwdeveloper.com)
21
- * @link http://www.dwdeveloper.com/
22
  */
23
  -->
24
  <config>
25
  <modules>
26
  <Strategery_Infinitescroll>
27
- <version>3.5.2</version>
28
  </Strategery_Infinitescroll>
29
  </modules>
30
  <global>
14
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
15
  * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
16
  *
17
+ * @author Gabriel Somoza (gabriel@strategery.io)
18
+ * @link https://strategery.io
19
+ *
20
+ * @author Damian A. Pastorini (damian.pastorini@strategery.io)
21
  *
 
 
22
  */
23
  -->
24
  <config>
25
  <modules>
26
  <Strategery_Infinitescroll>
27
+ <version>3.5.3</version>
28
  </Strategery_Infinitescroll>
29
  </modules>
30
  <global>
app/code/community/Strategery/Infinitescroll/etc/system.xml CHANGED
@@ -14,11 +14,11 @@
14
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
15
  * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
16
  *
17
- * @author Gabriel Somoza (me@gabrielsomoza.com)
18
- * @link http://gabrielsomoza.com/
19
  *
20
- * @author Damian A. Pastorini (damian.pastorini@dwdeveloper.com)
21
- * @link http://www.dwdeveloper.com/
22
  */
23
  -->
24
  <config>
14
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
15
  * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
16
  *
17
+ * @author Gabriel Somoza (gabriel@strategery.io)
18
+ * @link https://strategery.io
19
  *
20
+ * @author Damian A. Pastorini (damian.pastorini@strategery.io)
21
+ *
22
  */
23
  -->
24
  <config>
app/design/frontend/base/default/layout/strategery-infinitescroll.xml CHANGED
@@ -14,12 +14,11 @@
14
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
15
  * @copyright Copyright (c) 2016 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">
14
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
15
  * @copyright Copyright (c) 2016 Strategery Inc. (http://usestrategery.com)
16
  *
17
+ * @author Gabriel Somoza (gabriel@strategery.io)
18
+ * @link https://strategery.io
19
+ *
20
+ * @author Damian A. Pastorini (damian.pastorini@strategery.io)
21
+ *
 
22
  */
23
  -->
24
  <layout version="0.1.0">
app/design/frontend/base/default/template/strategery/infinitescroll/init.phtml CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
- /** @var $this Strategery_Infinitescroll_Block_Init */
3
  /**
4
  * InfiniteScroll - Magento Integration
5
  *
@@ -14,66 +13,66 @@
14
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
15
  * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
16
  *
17
- * @author Enrique Piatti (contacto@enriquepiatti.com)
 
 
 
18
  *
19
- * @author Damian A. Pastorini (damian.pastorini@dwdeveloper.com)
20
- * @link http://www.dwdeveloper.com/
21
  */
 
22
  ?>
23
  <?php if($this->isEnabled()): ?>
24
- <?php
25
  $configData = $this->getConfigData();
26
  $helper = Mage::helper('infinitescroll');
27
  $productListMode = $this->getProductListMode();
28
- ?>
29
- <?php if(Mage::getStoreConfig('infinitescroll/general/jquery')): ?>
30
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
31
  <script>window.jQuery || document.write('<script src="<?php echo $this->getJsUrl('jquery/jquery.1.10.2.min.js') ?>"><\/script>')</script>
32
  <script>jQuery.noConflict();</script>
33
- <?php endif ?>
34
- <?php if($iasConfig = $helper->getConfigData('advanced/ias_config')) :?>
35
  <script src="<?php echo $this->getSkinUrl($iasConfig) ?>"></script>
36
- <?php endif ?>
37
- <script type="text/javascript">
38
- //<![CDATA[
39
- windowLoadedFlag = false;
40
- window.onload = function () {
41
- windowLoadedFlag = true;
42
- };
43
-
44
- <?php // use: jQueryWaiter.execute(function(){ // safe jQuery code here }); ?>
45
- var jQueryWaiter = function () {
46
- var functions = [];
47
- var timer = function() {
48
- if( typeof window.jQuery != 'undefined') {
49
- while (functions.length) {
50
- functions.shift()(window.jQuery);
51
- }
52
- } else {
53
- window.setTimeout(timer, 100);
54
- }
55
  };
56
- timer();
57
- return {
58
- execute: function(onJQueryReady) {
59
- if (window.jQuery) {
60
- onJQueryReady(window.jQuery);
 
 
 
61
  } else {
62
- functions.push(onJQueryReady);
63
  }
64
- }
65
- };
66
- }();
67
-
68
- window.SgyIAS = {
69
- debug: <?php echo $helper->getConfigData('general/debug'); ?>,
70
- _log: function(object) {
71
- if(this.debug) {
72
- console.log(object);
73
- }
74
- },
75
- init: function(){
76
- jQuery.getScript("<?php echo $this->getJsUrl('jquery/infinitescroll/jquery-ias.min.js') ?>", function() {
 
 
 
 
 
 
 
 
77
  jQuery(function($) {
78
  var config = {
79
  item: '<?php echo $productListMode == 'grid' ? $helper->getConfigData('selectors/items_grid') : $helper->getConfigData('selectors/items_list') ?>',
@@ -105,32 +104,24 @@
105
  offset: <?php echo (int) $helper->getConfigData('design/load_more_threshold') ?>
106
  }
107
  };
108
-
109
  if (window.ias_config){
110
  $.extend(config, window.ias_config);
111
  }
112
-
113
  SgyIAS._log({extension: 'ias', config: config});
114
  window.ias = $.ias(config);
115
-
116
  SgyIAS._log({extension: 'paging'});
117
  window.ias.extension(new IASPagingExtension());
118
-
119
  SgyIAS._log({extension: 'spinner'});
120
  window.ias.extension(new IASSpinnerExtension(config.spinner));
121
-
122
  SgyIAS._log({extension: 'noneleft'});
123
  window.ias.extension(new IASNoneLeftExtension(config.noneleft));
124
-
125
  SgyIAS._log({extension: 'trigger'});
126
  window.ias.extension(new IASTriggerExtension(config.trigger));
127
-
128
  <?php if($helper->isMemoryActive()): ?>
129
- SgyIAS._log({extension: 'history'});
130
- window.ias.extension(new IASHistoryExtension(config.history));
131
  <?php endif; ?>
132
-
133
- // debug events
134
  window.ias.on('scroll', function(scrollOffset, scrollThreshold){
135
  SgyIAS._log({eventName: 'scroll', scrollOffset: scrollOffset, scrollThreshold: scrollThreshold});
136
  });
@@ -158,9 +149,7 @@
158
  window.ias.on('ready', function(){
159
  SgyIAS._log({eventName: 'ready'});
160
  });
161
-
162
  $('<?php echo Mage::getStoreConfig('infinitescroll/selectors/toolbar') ?>').<?php echo $helper->getConfigData('design/hide_toolbar') ? 'hide' : 'show' ?>();
163
-
164
  // custom fix for url protocol issue in jquery ias library:
165
  window.ias.getNextUrl = function(container) {
166
  if (!container) {
@@ -178,21 +167,19 @@
178
  return nexturl;
179
  };
180
  // custom fix for url protocol issue in jquery ias library.
181
-
182
  if(windowLoadedFlag){
183
  $(window).load();
184
  }
185
-
186
  SgyIAS._log('Done loading IAS.');
187
  $(document).trigger( "infiniteScrollReady", [window.ias]);
188
  });
189
- });
190
- }
191
- };
192
- <?php // this will prevent executing the infinite scroll before jQuery is loaded even when jQuery is loaded after this code ?>
193
- jQueryWaiter.execute(function(){
194
- SgyIAS.init();
195
- });
196
- //]]>
197
- </script>
198
  <?php endif ?>
1
  <?php
 
2
  /**
3
  * InfiniteScroll - Magento Integration
4
  *
13
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
14
  * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
15
  *
16
+ * @author Gabriel Somoza (gabriel@strategery.io)
17
+ * @link https://strategery.io
18
+ *
19
+ * @author Damian A. Pastorini (damian.pastorini@strategery.io)
20
  *
 
 
21
  */
22
+ /** @var $this Strategery_Infinitescroll_Block_Init */
23
  ?>
24
  <?php if($this->isEnabled()): ?>
25
+ <?php
26
  $configData = $this->getConfigData();
27
  $helper = Mage::helper('infinitescroll');
28
  $productListMode = $this->getProductListMode();
29
+ ?>
30
+ <?php if(Mage::getStoreConfig('infinitescroll/general/jquery')): ?>
31
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
32
  <script>window.jQuery || document.write('<script src="<?php echo $this->getJsUrl('jquery/jquery.1.10.2.min.js') ?>"><\/script>')</script>
33
  <script>jQuery.noConflict();</script>
34
+ <?php endif ?>
35
+ <?php if($iasConfig = $helper->getConfigData('advanced/ias_config')) :?>
36
  <script src="<?php echo $this->getSkinUrl($iasConfig) ?>"></script>
37
+ <?php endif ?>
38
+ <script type="text/javascript">
39
+ //<![CDATA[
40
+ windowLoadedFlag = false;
41
+ window.onload = function () {
42
+ windowLoadedFlag = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  };
44
+ <?php // use: jQueryWaiter.execute(function(){ // safe jQuery code here }); ?>
45
+ var jQueryWaiter = function () {
46
+ var functions = [];
47
+ var timer = function() {
48
+ if( typeof window.jQuery != 'undefined') {
49
+ while (functions.length) {
50
+ functions.shift()(window.jQuery);
51
+ }
52
  } else {
53
+ window.setTimeout(timer, 100);
54
  }
55
+ };
56
+ timer();
57
+ return {
58
+ execute: function(onJQueryReady) {
59
+ if (window.jQuery) {
60
+ onJQueryReady(window.jQuery);
61
+ } else {
62
+ functions.push(onJQueryReady);
63
+ }
64
+ }
65
+ };
66
+ }();
67
+ window.SgyIAS = {
68
+ debug: <?php echo $helper->getConfigData('general/debug'); ?>,
69
+ _log: function(object) {
70
+ if(this.debug) {
71
+ console.log(object);
72
+ }
73
+ },
74
+ init: function(){
75
+ jQuery.getScript("<?php echo $this->getJsUrl('jquery/infinitescroll/jquery-ias.min.js') ?>", function() {
76
  jQuery(function($) {
77
  var config = {
78
  item: '<?php echo $productListMode == 'grid' ? $helper->getConfigData('selectors/items_grid') : $helper->getConfigData('selectors/items_list') ?>',
104
  offset: <?php echo (int) $helper->getConfigData('design/load_more_threshold') ?>
105
  }
106
  };
 
107
  if (window.ias_config){
108
  $.extend(config, window.ias_config);
109
  }
 
110
  SgyIAS._log({extension: 'ias', config: config});
111
  window.ias = $.ias(config);
 
112
  SgyIAS._log({extension: 'paging'});
113
  window.ias.extension(new IASPagingExtension());
 
114
  SgyIAS._log({extension: 'spinner'});
115
  window.ias.extension(new IASSpinnerExtension(config.spinner));
 
116
  SgyIAS._log({extension: 'noneleft'});
117
  window.ias.extension(new IASNoneLeftExtension(config.noneleft));
 
118
  SgyIAS._log({extension: 'trigger'});
119
  window.ias.extension(new IASTriggerExtension(config.trigger));
 
120
  <?php if($helper->isMemoryActive()): ?>
121
+ SgyIAS._log({extension: 'history'});
122
+ window.ias.extension(new IASHistoryExtension(config.history));
123
  <?php endif; ?>
124
+ // debug events:
 
125
  window.ias.on('scroll', function(scrollOffset, scrollThreshold){
126
  SgyIAS._log({eventName: 'scroll', scrollOffset: scrollOffset, scrollThreshold: scrollThreshold});
127
  });
149
  window.ias.on('ready', function(){
150
  SgyIAS._log({eventName: 'ready'});
151
  });
 
152
  $('<?php echo Mage::getStoreConfig('infinitescroll/selectors/toolbar') ?>').<?php echo $helper->getConfigData('design/hide_toolbar') ? 'hide' : 'show' ?>();
 
153
  // custom fix for url protocol issue in jquery ias library:
154
  window.ias.getNextUrl = function(container) {
155
  if (!container) {
167
  return nexturl;
168
  };
169
  // custom fix for url protocol issue in jquery ias library.
 
170
  if(windowLoadedFlag){
171
  $(window).load();
172
  }
 
173
  SgyIAS._log('Done loading IAS.');
174
  $(document).trigger( "infiniteScrollReady", [window.ias]);
175
  });
176
+ });
177
+ }
178
+ };
179
+ <?php // this will prevent executing the infinite scroll before jQuery is loaded even when jQuery is loaded after this code ?>
180
+ jQueryWaiter.execute(function(){
181
+ SgyIAS.init();
182
+ });
183
+ //]]>
184
+ </script>
185
  <?php endif ?>
app/design/frontend/base/default/template/strategery/infinitescroll/swatches.phtml CHANGED
@@ -14,8 +14,11 @@
14
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
15
  * @copyright Copyright (c) 2016 Strategery Inc. (http://usestrategery.com)
16
  *
17
- * @author Damian A. Pastorini (damian.pastorini@dwdeveloper.com)
18
- * @link http://www.dwdeveloper.com/
 
 
 
19
  */
20
  ?>
21
  <?php
14
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
15
  * @copyright Copyright (c) 2016 Strategery Inc. (http://usestrategery.com)
16
  *
17
+ * @author Gabriel Somoza (gabriel@strategery.io)
18
+ * @link https://strategery.io
19
+ *
20
+ * @author Damian A. Pastorini (damian.pastorini@strategery.io)
21
+ *
22
  */
23
  ?>
24
  <?php
app/etc/modules/Strategery_Infinitescroll.xml CHANGED
@@ -14,8 +14,11 @@
14
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
15
  * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
16
  *
17
- * @author Gabriel Somoza (me@gabrielsomoza.com)
18
- * @link http://gabrielsomoza.com/
 
 
 
19
  */
20
  -->
21
  <config>
14
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
15
  * @copyright Copyright (c) 2014 Strategery Inc. (http://usestrategery.com)
16
  *
17
+ * @author Gabriel Somoza (gabriel@strategery.io)
18
+ * @link https://strategery.io
19
+ *
20
+ * @author Damian A. Pastorini (damian.pastorini@strategery.io)
21
+ *
22
  */
23
  -->
24
  <config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Strategery_InfiniteScroll2</name>
4
- <version>3.5.2</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>
@@ -30,12 +30,11 @@ User: demo&lt;br /&gt;&#xD;
30
  Password: demo1234&lt;/p&gt;&#xD;
31
  &lt;h2&gt;Reporting Issues / Support&lt;/h2&gt;&#xD;
32
  &lt;p&gt;To report issues or request support please visit our &lt;a href="https://github.com/Strategery-Inc/Magento-InfiniteScroll/issues"&gt;Github repository.&lt;/a&gt;&lt;/p&gt;</description>
33
- <notes>- Changed default configuration to prevent issues with jQuery in RWD/default theme.&#xD;
34
- - Added $j validation to prevent issues with other themes.</notes>
35
- <authors><author><name>Strategery</name><user>MAG000343402</user><email>contact@usestrategery.com</email></author><author><name>Damian A. Pastorini</name><user>MAG002087848</user><email>damian.pastorini@dwdeveloper.com</email></author></authors>
36
- <date>2016-08-18</date>
37
- <time>13:48:49</time>
38
- <contents><target name="mageetc"><dir name="modules"><file name="Strategery_Infinitescroll.xml" hash="4acaec55ca53dfe149334e9c6913a84a"/></dir></target><target name="magecommunity"><dir name="Strategery"><dir name="Infinitescroll"><dir name="Block"><file name="Init.php" hash="0fb8599150bdb9796c2c693719ec67f3"/></dir><dir name="Helper"><file name="Data.php" hash="120e9ec48726ee80f1d5aad19365867b"/></dir><dir name="Model"><dir name="Admin"><file name="Feed.php" hash="d03830b948d2a00c6115e5910af51f2d"/></dir><file name="Observer.php" hash="3fa797c12ed2d363f060a807b7888521"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a84c98f8f3307a3360bf783137c3aeeb"/><file name="config.xml" hash="f5206324f7b85669bbb93850be1fb5a1"/><file name="system.xml" hash="d355ca6528b525bc4b9820b0d0860395"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="strategery-infinitescroll.xml" hash="94478e1d7ad26830cbcead5dd9d7d731"/></dir><dir name="template"><dir name="strategery"><dir name="infinitescroll"><file name="init.phtml" hash="f6f61ab6a5dc87875e916353c71bde1a"/><file name="swatches.phtml" hash="ac9cba136244abc31d3a4ad244799506"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="jquery"><dir name="infinitescroll"><file name="jquery-ias.min.js" hash="cfe10e85a71ad6610334c946d03c1088"/><file name="jquery.easing-1.3.pack.js" hash="83e56485c52e15ff74e1c02615af14af"/><file name="jquery.ui.totop.min.js" hash="c0c43bf13983cd65ab4584b479d2a2d9"/></dir><file name="jquery.1.10.2.min.js" hash="081a630addf862ccdaa440a5705d11af"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="infinitescroll"><file name="ias_config.js" hash="584a12af9d9cb2fbef5de7e73a6df4bc"/></dir></dir></dir></dir></dir></target></contents>
39
  <compatible/>
40
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
41
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Strategery_InfiniteScroll2</name>
4
+ <version>3.5.3</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>
30
  Password: demo1234&lt;/p&gt;&#xD;
31
  &lt;h2&gt;Reporting Issues / Support&lt;/h2&gt;&#xD;
32
  &lt;p&gt;To report issues or request support please visit our &lt;a href="https://github.com/Strategery-Inc/Magento-InfiniteScroll/issues"&gt;Github repository.&lt;/a&gt;&lt;/p&gt;</description>
33
+ <notes>- Refactor for Marketplace migration.</notes>
34
+ <authors><author><name>Strategery</name><user>MAG000343402</user><email>contact@usestrategery.com</email></author><author><name>Damian A. Pastorini</name><user>MAG002087848</user><email>damian.pastorini@strategery.io</email></author></authors>
35
+ <date>2016-11-04</date>
36
+ <time>13:28:52</time>
37
+ <contents><target name="mageetc"><dir name="modules"><file name="Strategery_Infinitescroll.xml" hash="a5256b7370148292e109ba86b450e914"/></dir></target><target name="magecommunity"><dir name="Strategery"><dir name="Infinitescroll"><dir name="Block"><file name="Init.php" hash="d4fbff4f715a86e331f75b0d1028fb16"/></dir><dir name="Helper"><file name="Data.php" hash="9337c9bc6d01683e365f1f348423cf9b"/></dir><dir name="Model"><dir name="Admin"><file name="Feed.php" hash="280bef470899cf5431847950bf077cdf"/></dir><file name="Observer.php" hash="0dffc39ee08626b27b9781826d2dbd11"/></dir><dir name="etc"><file name="adminhtml.xml" hash="52a5f5e56f8c89be2f5e0a5eae4cc673"/><file name="config.xml" hash="1e7775cfb65f1efcfdd88b4b228d9e69"/><file name="system.xml" hash="c5d96191bf085119b94845eb28b50605"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="strategery-infinitescroll.xml" hash="944f83fad37fd682cc00110c6e74e616"/></dir><dir name="template"><dir name="strategery"><dir name="infinitescroll"><file name="init.phtml" hash="e15b50a0d86ab02451c0be29a0eea237"/><file name="swatches.phtml" hash="f9a9ee9691ac59519df0f29831d3394e"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="jquery"><dir name="infinitescroll"><file name="jquery-ias.min.js" hash="cfe10e85a71ad6610334c946d03c1088"/><file name="jquery.easing-1.3.pack.js" hash="83e56485c52e15ff74e1c02615af14af"/><file name="jquery.ui.totop.min.js" hash="c0c43bf13983cd65ab4584b479d2a2d9"/></dir><file name="jquery.1.10.2.min.js" hash="081a630addf862ccdaa440a5705d11af"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="infinitescroll"><file name="ias_config.js" hash="4383a924f5f5447af26c49a4c1283bc2"/></dir></dir></dir></dir></dir></target></contents>
 
38
  <compatible/>
39
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
40
  </package>
skin/frontend/base/default/js/infinitescroll/ias_config.js CHANGED
@@ -1,8 +1,10 @@
1
- window.ias_config = {
2
- // options from https://github.com/webcreate/infinite-ajax-scroll
3
- };
4
-
5
- /* IS Custom Event to Hook into */
6
- /*jQuery(document).on('infiniteScrollReady',function(){
7
- console.log('bam!');
8
- });*/
 
 
1
+ window.ias_config = {
2
+ // options from https://github.com/webcreate/infinite-ajax-scroll
3
+ };
4
+
5
+ /* IS Custom Event to Hook into */
6
+ /*
7
+ jQuery(document).on('infiniteScrollReady',function(){
8
+ console.log('bam!');
9
+ });
10
+ */