ET_AdvancedCompare - Version 1.0.7

Version Notes

stable release

Download this release

Release Info

Developer Magento Core Team
Extension ET_AdvancedCompare
Version 1.0.7
Comparing to
See all releases


Code changes from version 1.0.6 to 1.0.7

app/code/community/ET/AdvancedCompare/controllers/IndexController.php CHANGED
@@ -21,7 +21,7 @@ require_once 'Mage/Catalog/controllers/Product/CompareController.php';
21
 
22
  class ET_AdvancedCompare_IndexController extends Mage_Catalog_Product_CompareController
23
  {
24
- protected $_limitMessage=null;
25
 
26
  public function redrawsidebarAction()
27
  {
@@ -35,7 +35,7 @@ class ET_AdvancedCompare_IndexController extends Mage_Catalog_Product_CompareCon
35
 
36
  $rendererhtml = $renderer->toHtml();
37
  if ($this->_limitMessage) {
38
- $rendererhtml .= "<script>alert('".str_replace("'", "\\'", $this->_limitMessage)."');</script>";
39
  }
40
 
41
  $this->getResponse()->setBody(Zend_Json::encode($rendererhtml));
@@ -49,11 +49,13 @@ class ET_AdvancedCompare_IndexController extends Mage_Catalog_Product_CompareCon
49
  public function addAction()
50
  {
51
  try {
52
- $formKey = $this->getRequest()->getParam('form_key', null);
53
- if (Mage::getSingleton('core/session')->getFormKey() != $formKey) {
54
- $errorMessage = $this->__('Please enable cookies in your web browser to continue.');
55
- $this->getResponse()->setBody(Zend_Json::encode(array('cookieError' => $errorMessage)));
56
- return;
 
 
57
  }
58
 
59
  if (Mage::getStoreConfig('advancedcompare/limits/enable_compare_limits')) {
@@ -99,7 +101,7 @@ class ET_AdvancedCompare_IndexController extends Mage_Catalog_Product_CompareCon
99
 
100
  public function silentclearAction()
101
  {
102
- /** @var $session Mage_Catalog_Model_Session*/
103
  $session = Mage::getSingleton('catalog/session');
104
  $this->clearAction();
105
  $errors = $session->getMessages(true)->getErrors();
@@ -113,11 +115,11 @@ class ET_AdvancedCompare_IndexController extends Mage_Catalog_Product_CompareCon
113
  }
114
  }
115
 
116
- protected function _redirectReferer($defaultUrl=null)
117
  {
118
  if (
119
  ($this->getRequest()->getModuleName() == "advancedcompare")
120
- &(in_array($this->getRequest()->getActionName(), array("silentadd", "silentremove", "silentclear")))
121
  ) {
122
  $this->redrawsidebarAction();
123
  } else {
21
 
22
  class ET_AdvancedCompare_IndexController extends Mage_Catalog_Product_CompareController
23
  {
24
+ protected $_limitMessage = null;
25
 
26
  public function redrawsidebarAction()
27
  {
35
 
36
  $rendererhtml = $renderer->toHtml();
37
  if ($this->_limitMessage) {
38
+ $rendererhtml .= "<script>alert('" . str_replace("'", "\\'", $this->_limitMessage) . "');</script>";
39
  }
40
 
41
  $this->getResponse()->setBody(Zend_Json::encode($rendererhtml));
49
  public function addAction()
50
  {
51
  try {
52
+ if (version_compare(Mage::getVersion(), '1.8.0.0', '>')) {
53
+ $formKey = $this->getRequest()->getParam('form_key', null);
54
+ if (Mage::getSingleton('core/session')->getFormKey() != $formKey) {
55
+ $errorMessage = $this->__('Please enable cookies in your web browser to continue.');
56
+ $this->getResponse()->setBody(Zend_Json::encode(array('cookieError' => $errorMessage)));
57
+ return;
58
+ }
59
  }
60
 
61
  if (Mage::getStoreConfig('advancedcompare/limits/enable_compare_limits')) {
101
 
102
  public function silentclearAction()
103
  {
104
+ /** @var $session Mage_Catalog_Model_Session */
105
  $session = Mage::getSingleton('catalog/session');
106
  $this->clearAction();
107
  $errors = $session->getMessages(true)->getErrors();
115
  }
116
  }
117
 
118
+ protected function _redirectReferer($defaultUrl = null)
119
  {
120
  if (
121
  ($this->getRequest()->getModuleName() == "advancedcompare")
122
+ & (in_array($this->getRequest()->getActionName(), array("silentadd", "silentremove", "silentclear")))
123
  ) {
124
  $this->redrawsidebarAction();
125
  } else {
app/code/community/ET/AdvancedCompare/etc/config.xml CHANGED
@@ -22,7 +22,7 @@
22
  <modules>
23
  <ET_AdvancedCompare>
24
  <name>ET Advanced Compare</name>
25
- <version>1.0.6</version>
26
  <descr>
27
  <ru_RU><![CDATA[Реализует работу сравнения без перезагрузки (технология Ajax), улучшает наглядность результатов, а также позволяет отключить функцию сравнения вообще.]]>
28
  </ru_RU>
22
  <modules>
23
  <ET_AdvancedCompare>
24
  <name>ET Advanced Compare</name>
25
+ <version>1.0.7</version>
26
  <descr>
27
  <ru_RU><![CDATA[Реализует работу сравнения без перезагрузки (технология Ajax), улучшает наглядность результатов, а также позволяет отключить функцию сравнения вообще.]]>
28
  </ru_RU>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ET_AdvancedCompare</name>
4
- <version>1.0.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://shop.etwebsolutions.com/eng/etws-license-free-v1">ETWS Free License (EFL1)</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>_Extension allows to add products to compare without page reloading (AJAX), improves visualization of results and allows to switch compare off on your website._</description>
11
  <notes>stable release</notes>
12
  <authors><author><name>Jurij</name><user>auto-converted</user><email>support@etwebsolutions.com</email></author><author><name>Andrej</name><user>auto-converted</user><email>support@etwebsolutions.com</email></author></authors>
13
- <date>2015-01-13</date>
14
- <time>08:31:31</time>
15
- <contents><target name="magecommunity"><dir name="ET"><dir name="AdvancedCompare"><dir name="Block"><dir name="Adminhtml"><file name="Support.php" hash="79d3f4eaf70ac0618a8ff806912c414c"/></dir></dir><dir name="Helper"><file name="Data.php" hash="702052fe21125ebfc48d8aa66cf673a1"/></dir><dir name="Model"><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><dir name="Product"><dir name="Compare"><dir name="Item"><file name="Collection.php" hash="e9db5afa88daf6a70525bf2b58160489"/></dir></dir></dir></dir></dir></dir><file name="Observer.php" hash="61fbfc9a19dbbfa9f8d78de3ac727186"/></dir><dir name="controllers"><file name="IndexController.php" hash="0ce26f4057f27dc65459b30c8ebd4365"/></dir><dir name="etc"><file name="config.xml" hash="7c6191d03c551e159230eab7daa1a5e9"/><file name="system.xml" hash="0239ba90072ca541a8bfe4b5f7d8020b"/></dir><dir name="sql"><dir name="advancedcompare_setup"><file name="mysql4-install-0.1.php" hash="e4038068589261327903f210af4ca747"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="ru_RU"><file name="ET_AdvancedCompare.csv" hash="e890d24f33d460804033247b7f668eb1"/></dir><dir name="en_US"><file name="ET_AdvancedCompare.csv" hash="772f8c59d17d778d471ad0850e8eb01e"/></dir><dir name="lv_LV"><file name="ET_AdvancedCompare.csv" hash="ed2b485b44f1df6ad41350011bcc2e06"/></dir></target><target name="mageetc"><dir name="modules"><file name="ET_AdvancedCompare.xml" hash="1f3eca245249878c9da9481464c2b84e"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="et_advancedcompare"><file name="list.phtml" hash="ea8bf46ca7a8a99da8fdb8601676bfe0"/><file name="list_13x.phtml" hash="045859ed681f3854c4c13be3e26cf275"/><file name="list_15x.phtml" hash="f5b0c350a28f87e90543c2978580abcc"/><file name="list_15x_custom.phtml" hash="f79ea8ec2c6cbecf26042bf5c0d5f888"/></dir></dir><dir name="layout"><file name="et_advancedcompare.xml" hash="d87c72cb9b2bea665b1cf90f038658ad"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="et_advancedcompare"><file name="noreload.css" hash="e2e7f8762594c129ad84ef865694d88e"/></dir></dir><dir name="js"><dir name="et_advancedcompare"><file name="noreload.js" hash="5408173d76a230620707f27974c59b7a"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ET_AdvancedCompare</name>
4
+ <version>1.0.7</version>
5
  <stability>stable</stability>
6
  <license uri="http://shop.etwebsolutions.com/eng/etws-license-free-v1">ETWS Free License (EFL1)</license>
7
  <channel>community</channel>
10
  <description>_Extension allows to add products to compare without page reloading (AJAX), improves visualization of results and allows to switch compare off on your website._</description>
11
  <notes>stable release</notes>
12
  <authors><author><name>Jurij</name><user>auto-converted</user><email>support@etwebsolutions.com</email></author><author><name>Andrej</name><user>auto-converted</user><email>support@etwebsolutions.com</email></author></authors>
13
+ <date>2015-02-12</date>
14
+ <time>13:17:19</time>
15
+ <contents><target name="magecommunity"><dir name="ET"><dir name="AdvancedCompare"><dir name="Block"><dir name="Adminhtml"><file name="Support.php" hash="79d3f4eaf70ac0618a8ff806912c414c"/></dir></dir><dir name="Helper"><file name="Data.php" hash="702052fe21125ebfc48d8aa66cf673a1"/></dir><dir name="Model"><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><dir name="Product"><dir name="Compare"><dir name="Item"><file name="Collection.php" hash="e9db5afa88daf6a70525bf2b58160489"/></dir></dir></dir></dir></dir></dir><file name="Observer.php" hash="61fbfc9a19dbbfa9f8d78de3ac727186"/></dir><dir name="controllers"><file name="IndexController.php" hash="c017290e58ec2469f5eb14c4b89acb9e"/></dir><dir name="etc"><file name="config.xml" hash="a9cbc994e8f45385ba15748b56ae7bc4"/><file name="system.xml" hash="0239ba90072ca541a8bfe4b5f7d8020b"/></dir><dir name="sql"><dir name="advancedcompare_setup"><file name="mysql4-install-0.1.php" hash="e4038068589261327903f210af4ca747"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="ru_RU"><file name="ET_AdvancedCompare.csv" hash="e890d24f33d460804033247b7f668eb1"/></dir><dir name="en_US"><file name="ET_AdvancedCompare.csv" hash="772f8c59d17d778d471ad0850e8eb01e"/></dir><dir name="lv_LV"><file name="ET_AdvancedCompare.csv" hash="ed2b485b44f1df6ad41350011bcc2e06"/></dir></target><target name="mageetc"><dir name="modules"><file name="ET_AdvancedCompare.xml" hash="1f3eca245249878c9da9481464c2b84e"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="et_advancedcompare"><file name="list.phtml" hash="ea8bf46ca7a8a99da8fdb8601676bfe0"/><file name="list_13x.phtml" hash="045859ed681f3854c4c13be3e26cf275"/><file name="list_15x.phtml" hash="f5b0c350a28f87e90543c2978580abcc"/><file name="list_15x_custom.phtml" hash="f79ea8ec2c6cbecf26042bf5c0d5f888"/></dir></dir><dir name="layout"><file name="et_advancedcompare.xml" hash="d87c72cb9b2bea665b1cf90f038658ad"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="et_advancedcompare"><file name="noreload.css" hash="e2e7f8762594c129ad84ef865694d88e"/></dir></dir><dir name="js"><dir name="et_advancedcompare"><file name="noreload.js" hash="5408173d76a230620707f27974c59b7a"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>