Strategery_InfiniteScroll2 - Version 2.1.8

Version Notes

Automatic load next page of current product list.
Support for Magento 1.3 up to 1.7.2.
Fixed Observer.php

Download this release

Release Info

Developer Damian A. Pastorini
Extension Strategery_InfiniteScroll2
Version 2.1.8
Comparing to
See all releases


Code changes from version 2.1.7 to 2.1.8

app/code/community/Strategery/Infinitescroll2/Block/Config.php CHANGED
@@ -1,29 +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 Miguel Balparda
17
- */
18
- class Strategery_Infinitescroll2_Block_Config extends Mage_Core_Block_Text
19
- {
20
-
21
- public function setJsText($text)
22
- {
23
- $url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).$text;
24
- $val = "<script type='text/javascript' src='$url'></script>";
25
- $this->setData('text', $val);
26
- return $this;
27
- }
28
-
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 Miguel Balparda
17
+ */
18
+ class Strategery_Infinitescroll2_Block_Config extends Mage_Core_Block_Text
19
+ {
20
+
21
+ public function setJsText($text)
22
+ {
23
+ $url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).$text;
24
+ $val = "<script type='text/javascript' src='$url'></script>";
25
+ $this->setData('text', $val);
26
+ return $this;
27
+ }
28
+
29
+ }
app/code/community/Strategery/Infinitescroll2/Block/Flush.php CHANGED
@@ -1,40 +1,40 @@
1
- <?php
2
- class Strategery_Infinitescroll2_Block_Flush extends Mage_Adminhtml_Block_System_Config_Form_Field
3
- {
4
-
5
- protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
6
- $this->setElement($element);
7
- $fromStore = $element->getScopeId();
8
- $layout = $this->getLayout();
9
- $flushTag = $element->getOriginalData('flush_tag');
10
- $flushUrl = Mage::getUrl($element->getOriginalData('flush_url'));
11
- $button = $layout->createBlock('adminhtml/widget_button')
12
- ->setType('button')
13
- ->setClass('scalable')
14
- ->setLabel('Flush Cache')
15
- ->setOnClick('javascript:executeFlush'.$flushTag.'();');
16
- $buttonHTML = $button->toHtml();
17
- $jsFunction = '
18
- <script type="text/javascript">
19
- function executeFlush'.$flushTag.'()
20
- {
21
- if(confirm("Are you sure?")) {
22
- new Ajax.Request("'.$flushUrl.'",{
23
- method: "get",
24
- onSuccess: function(transport){
25
- if (transport.responseText=="1"){
26
- alert("Cache flushed.");
27
- }
28
- },
29
- onFailure: function (transport){
30
- alert("Error");
31
- }
32
- });
33
- }
34
- }
35
- </script>';
36
- $html = $layout->createBlock('core/text','flush-button')->setText($jsFunction.$buttonHTML)->toHtml();
37
- return $html;
38
- }
39
-
40
- }
1
+ <?php
2
+ class Strategery_Infinitescroll2_Block_Flush extends Mage_Adminhtml_Block_System_Config_Form_Field
3
+ {
4
+
5
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
6
+ $this->setElement($element);
7
+ $fromStore = $element->getScopeId();
8
+ $layout = $this->getLayout();
9
+ $flushTag = $element->getOriginalData('flush_tag');
10
+ $flushUrl = Mage::getUrl($element->getOriginalData('flush_url'));
11
+ $button = $layout->createBlock('adminhtml/widget_button')
12
+ ->setType('button')
13
+ ->setClass('scalable')
14
+ ->setLabel('Flush Cache')
15
+ ->setOnClick('javascript:executeFlush'.$flushTag.'();');
16
+ $buttonHTML = $button->toHtml();
17
+ $jsFunction = '
18
+ <script type="text/javascript">
19
+ function executeFlush'.$flushTag.'()
20
+ {
21
+ if(confirm("Are you sure?")) {
22
+ new Ajax.Request("'.$flushUrl.'",{
23
+ method: "get",
24
+ onSuccess: function(transport){
25
+ if (transport.responseText=="1"){
26
+ alert("Cache flushed.");
27
+ }
28
+ },
29
+ onFailure: function (transport){
30
+ alert("Error");
31
+ }
32
+ });
33
+ }
34
+ }
35
+ </script>';
36
+ $html = $layout->createBlock('core/text','flush-button')->setText($jsFunction.$buttonHTML)->toHtml();
37
+ return $html;
38
+ }
39
+
40
+ }
app/code/community/Strategery/Infinitescroll2/Model/Catalog/Observer.php CHANGED
@@ -23,7 +23,7 @@ class Strategery_Infinitescroll2_Model_Catalog_Observer
23
  {
24
  // check general and instance enable:
25
  $whereare = $this->_whereAreWe();
26
- if(Mage::getStoreConfig('infinitescroll2/general/enable') && Mage::getStoreConfig('infinitescroll2/instances/'.$whereare))
27
  {
28
  // reset:
29
  $this->hardReset();
@@ -98,7 +98,7 @@ class Strategery_Infinitescroll2_Model_Catalog_Observer
98
  {
99
  // check general and instance enable:
100
  $whereare = $this->_whereAreWe();
101
- if(Mage::getStoreConfig('infinitescroll2/general/enable') && Mage::getStoreConfig('infinitescroll2/instances/'.$whereare))
102
  {
103
  // helper:
104
  $helper = Mage::helper('infinitescroll2');
23
  {
24
  // check general and instance enable:
25
  $whereare = $this->_whereAreWe();
26
+ if(Mage::getStoreConfig('infinitescroll2/general/enabled') && Mage::getStoreConfig('infinitescroll2/instances/'.$whereare))
27
  {
28
  // reset:
29
  $this->hardReset();
98
  {
99
  // check general and instance enable:
100
  $whereare = $this->_whereAreWe();
101
+ if(Mage::getStoreConfig('infinitescroll2/general/enabled') && Mage::getStoreConfig('infinitescroll2/instances/'.$whereare))
102
  {
103
  // helper:
104
  $helper = Mage::helper('infinitescroll2');
app/code/community/Strategery/Infinitescroll2/controllers/CacheController.php CHANGED
@@ -1,34 +1,34 @@
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_CacheController extends Mage_Core_Controller_Front_Action
20
- {
21
-
22
- public function flushAction()
23
- {
24
- $result = false;
25
- try {
26
- $result = Mage::helper('infinitescroll2')->flushCache();
27
- }
28
- catch (Exception $e) {
29
- $this->_getSession()->addError($e->getMessage());
30
- }
31
- echo $result;
32
- }
33
-
34
  }
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_CacheController extends Mage_Core_Controller_Front_Action
20
+ {
21
+
22
+ public function flushAction()
23
+ {
24
+ $result = false;
25
+ try {
26
+ $result = Mage::helper('infinitescroll2')->flushCache();
27
+ }
28
+ catch (Exception $e) {
29
+ $this->_getSession()->addError($e->getMessage());
30
+ }
31
+ echo $result;
32
+ }
33
+
34
  }
app/code/community/Strategery/Infinitescroll2/etc/config.xml CHANGED
@@ -25,7 +25,7 @@
25
  <config>
26
  <modules>
27
  <Strategery_Infinitescroll2>
28
- <version>2.1.7</version>
29
  </Strategery_Infinitescroll2>
30
  </modules>
31
  <global>
25
  <config>
26
  <modules>
27
  <Strategery_Infinitescroll2>
28
+ <version>2.1.8</version>
29
  </Strategery_Infinitescroll2>
30
  </modules>
31
  <global>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Strategery_InfiniteScroll2</name>
4
- <version>2.1.7</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>
@@ -9,7 +9,7 @@
9
  <summary>Automatically load the next page of products by AJAX after the end of the list.</summary>
10
  <description>Description:&#xD;
11
  This extension is for when the user reaches the end of the current product list, the next page is loaded automatically by AJAX after the end of the list.&#xD;
12
- Easy to install and configure, this module works 100% out of the box with Magento's default theme, and also gives to you the posibility to configurate the custom selectors of your custom theme.&#xD;
13
  Now you can get a more friendly UI by helping the user to save clicks and time.&#xD;
14
  &#xD;
15
  Demo:&#xD;
@@ -29,11 +29,12 @@ Configuration:&#xD;
29
  If you have a different theme other than the default, you will need to copy the default theme files to your custom theme folder and configure the plugin by going to System / Configuration / Catalog / Infinite Scroll.&#xD;
30
  NOTE: If you have another JS module that adds some custom behavior to the product list, remember to use our callback function to add that behavior to the products loaded by InfiniteScroll.</description>
31
  <notes>Automatic load next page of current product list.&#xD;
32
- Support for Magento 1.3 up to 1.7.2</notes>
33
- <authors><author><name>Damian Alberto Pastorini</name><user>auto-converted</user><email>damian.pastorini@usestrategery.com</email></author></authors>
34
- <date>2013-02-22</date>
35
- <time>16:52:04</time>
36
- <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="Block"><file name="Config.php" hash="a587b8e8ed1ab41594bd0db6e320358b"/><file name="Flush.php" hash="d04139875ed190aec2431a7a83deaa21"/></dir><dir name="Helper"><file name="Data.php" hash="05de0d81682ca71b7d34e82e1ba2be60"/></dir><dir name="Model"><dir name="Catalog"><file name="Observer.php" hash="cea567a4ec5bf69e9c7b3a217927e07d"/></dir></dir><dir name="controllers"><file name="CacheController.php" hash="1029bfa5495cfcf02cad62aa8a40ace3"/><file name="JsController.php" hash="3d97abe7a35b69bb70e6bb3ab1414f47"/></dir><dir name="etc"><file name="config.xml" hash="8fed346b0c54f2dc1d1df3eff6763491"/><file name="system.xml" hash="6c0034e3648fc34d730642876f376161"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="strategery-infinitescroll2.xml" hash="f8c0447f74f31b576d9e9cee89c99b8f"/></dir><dir name="template"><dir name="strategery"><dir name="infinitescroll2"><file name="js.phtml" hash="85f7a4b3265da1693c03ff97ac17094e"/><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="88a5a092c68911819302952e2128fe34"/></dir><file name="https.js" hash="be476c35fecb93b0a88625d8bc8a128b"/><file name="jquery.infinitescroll.js" hash="862b580a996c3f7a9daa1fcc1fae808d"/><file name="jquery.infinitescroll.min.js" hash="24131ba057a50077af7a97dfa1fcde30"/></dir><file name="jquery.latest.min.js" hash="7ffe78e450bedfa8878241c3abc5edba"/></dir></dir></target></contents>
 
37
  <compatible/>
38
- <dependencies/>
39
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Strategery_InfiniteScroll2</name>
4
+ <version>2.1.8</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>
9
  <summary>Automatically load the next page of products by AJAX after the end of the list.</summary>
10
  <description>Description:&#xD;
11
  This extension is for when the user reaches the end of the current product list, the next page is loaded automatically by AJAX after the end of the list.&#xD;
12
+ Easy to install and configure, this module works 100% out of the box with Magento&amp;apos;s default theme, and also gives to you the posibility to configurate the custom selectors of your custom theme.&#xD;
13
  Now you can get a more friendly UI by helping the user to save clicks and time.&#xD;
14
  &#xD;
15
  Demo:&#xD;
29
  If you have a different theme other than the default, you will need to copy the default theme files to your custom theme folder and configure the plugin by going to System / Configuration / Catalog / Infinite Scroll.&#xD;
30
  NOTE: If you have another JS module that adds some custom behavior to the product list, remember to use our callback function to add that behavior to the products loaded by InfiniteScroll.</description>
31
  <notes>Automatic load next page of current product list.&#xD;
32
+ Support for Magento 1.3 up to 1.7.2.&#xD;
33
+ Fixed Observer.php</notes>
34
+ <authors><author><name>Damian Alberto Pastorini</name><user>strategery</user><email>damian.pastorini@usestrategery.com</email></author><author><name>Miguel Balparda</name><user>strategery</user><email>miguel.balparda@usestrategery.om</email></author></authors>
35
+ <date>2013-03-15</date>
36
+ <time>12:17:27</time>
37
+ <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="Block"><file name="Config.php" hash="427f0bd42480db0b93e04711c9f1c8fe"/><file name="Flush.php" hash="335bf80fc852b77d96e20aceb7ec97fe"/></dir><dir name="Helper"><file name="Data.php" hash="05de0d81682ca71b7d34e82e1ba2be60"/></dir><dir name="Model"><dir name="Catalog"><file name="Observer.php" hash="4c2a1a0910ed1b2ac0d79c603d54b336"/></dir></dir><dir name="controllers"><file name="CacheController.php" hash="8d15ceda1ccd223f22c34d85f9714684"/><file name="JsController.php" hash="3d97abe7a35b69bb70e6bb3ab1414f47"/></dir><dir name="etc"><file name="config.xml" hash="2ea61b70b0426aec58d39f58839ca56f"/><file name="system.xml" hash="6c0034e3648fc34d730642876f376161"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="strategery-infinitescroll2.xml" hash="f8c0447f74f31b576d9e9cee89c99b8f"/></dir><dir name="template"><dir name="strategery"><dir name="infinitescroll2"><file name="js.phtml" hash="85f7a4b3265da1693c03ff97ac17094e"/><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="88a5a092c68911819302952e2128fe34"/></dir><file name="https.js" hash="be476c35fecb93b0a88625d8bc8a128b"/><file name="jquery.infinitescroll.js" hash="862b580a996c3f7a9daa1fcc1fae808d"/><file name="jquery.infinitescroll.min.js" hash="24131ba057a50077af7a97dfa1fcde30"/></dir><file name="jquery.latest.min.js" hash="7ffe78e450bedfa8878241c3abc5edba"/></dir></dir></target></contents>
38
  <compatible/>
39
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
40
  </package>