ET_AdvancedCompare - Version 1.0.1

Version Notes

stable release

Download this release

Release Info

Developer Jurij
Extension ET_AdvancedCompare
Version 1.0.1
Comparing to
See all releases


Code changes from version 0.5.0 to 1.0.1

Files changed (24) hide show
  1. app/code/community/ET/AdvancedCompare/Block/Adminhtml/Support.php +122 -0
  2. app/code/community/ET/AdvancedCompare/Block/List.php +19 -22
  3. app/code/community/ET/AdvancedCompare/Helper/Data.php +22 -20
  4. app/code/community/ET/AdvancedCompare/Model/Resource/Eav/Mysql4/Product/Compare/Item/Collection.php +146 -119
  5. app/code/community/ET/AdvancedCompare/controllers/IndexController.php +70 -38
  6. app/code/community/ET/AdvancedCompare/etc/config.xml +198 -181
  7. app/code/community/ET/AdvancedCompare/etc/system.xml +178 -141
  8. app/code/community/ET/AdvancedCompare/sql/advancedcompare_setup/mysql4-install-0.1.php +25 -26
  9. app/code/community/ET/ET_AdvancedCompare_ChangeLog.txt +0 -20
  10. app/code/community/ET/ET_AdvancedCompare_Description.txt +0 -75
  11. app/code/community/ET/ET_AdvancedCompare_LICENSE.txt +0 -48
  12. app/design/frontend/base/default/layout/et_advancedcompare.xml +46 -0
  13. app/design/frontend/{default → base}/default/template/et_advancedcompare/list_13x.phtml +82 -81
  14. app/design/frontend/{default → base}/default/template/et_advancedcompare/list_15x.phtml +111 -88
  15. app/design/frontend/default/default/layout/et_advancedcompare.xml +0 -47
  16. app/etc/modules/ET_AdvancedCompare.xml +15 -16
  17. app/locale/en_US/ET_AdvancedCompare.csv +6 -1
  18. app/locale/lv_LV/ET_AdvancedCompare.csv +6 -1
  19. app/locale/ru_RU/ET_AdvancedCompare.csv +17 -1
  20. package.xml +9 -13
  21. skin/frontend/base/default/css/et_advancedcompare/noreload.css +4 -0
  22. skin/frontend/base/default/js/et_advancedcompare/noreload.js +250 -0
  23. skin/frontend/default/default/css/noreload.css +0 -4
  24. skin/frontend/default/default/js/noreload.js +0 -244
app/code/community/ET/AdvancedCompare/Block/Adminhtml/Support.php ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * You may not sell, sub-license, rent or lease
6
+ * any portion of the Software or Documentation to anyone.
7
+ *
8
+ * DISCLAIMER
9
+ *
10
+ * Do not edit or add to this file if you wish to upgrade to newer
11
+ * versions in the future.
12
+ *
13
+ * @category ET
14
+ * @package ET_AdvancedCompare
15
+ * @copyright Copyright (c) 2012 ET Web Solutions (http://etwebsolutions.com)
16
+ * @contacts support@etwebsolutions.com
17
+ * @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
18
+ */
19
+
20
+ class ET_AdvancedCompare_Block_Adminhtml_Support
21
+ extends Mage_Adminhtml_Block_Abstract
22
+ implements Varien_Data_Form_Element_Renderer_Interface
23
+ {
24
+ /**
25
+ * Support tab
26
+ * version 1.0.0
27
+ */
28
+ public function render(Varien_Data_Form_Element_Abstract $element)
29
+ {
30
+ $helper = Mage::helper('advancedcompare');
31
+ $moduleNameId = 'ET_AdvancedCompare';
32
+
33
+ $moduleVersion = $this->_getConfigValue($moduleNameId, 'version');
34
+ $moduleName = $this->_getConfigValue($moduleNameId, 'name');
35
+ $moduleShortDescription = $this->_getConfigValue($moduleNameId, 'descr');
36
+ $moduleLicense = $this->_getConfigValue($moduleNameId, 'license');
37
+
38
+ $linkParameters = '?module=' . $moduleNameId . '&ver=' . $moduleVersion . '&ref=' . $_SERVER['HTTP_HOST'];
39
+ $moduleLicenseLink = $this->_getConfigValue($moduleNameId, 'licenselink') . $linkParameters;
40
+ $moduleSupportLink = $this->_getConfigValue($moduleNameId, 'redminelink') . $linkParameters;
41
+ $moduleLink = $this->_getConfigValue($moduleNameId, 'permanentlink') . $linkParameters;
42
+ $servicesLink = $this->_getConfigValue($moduleNameId, 'ourserviceslink') . $linkParameters;
43
+
44
+ $html =
45
+ '<style>
46
+ .line {border-top: 1px solid #c6c6c6; }
47
+ .developer-label {color: #000000; font-weight:bold; width: 150px;}
48
+ .developer-text { padding-bottom: 15px;}
49
+ .developer {width: 600px; }
50
+ </style>';
51
+
52
+ $html .= '
53
+ <table cellspacing="0" cellpading="0" class="developer">
54
+ <tr>
55
+ <td class="developer-label">' . $helper->__('Extension:') . '</td>
56
+ <td class="developer-text">' . $helper->__(
57
+ '<strong>%s</strong> (version %s)',
58
+ $moduleName,
59
+ $moduleVersion
60
+ ) . '</td>
61
+ </tr>
62
+ <tr>
63
+ <td class="developer-label">' . $helper->__('License:') . '</td>
64
+ <td class="developer-text">' . $helper->__(
65
+ '<a href="%s" target="_blank">%s</a>',
66
+ $moduleLicenseLink,
67
+ $moduleLicense
68
+ ) . '</td>
69
+ </tr>
70
+ <tr>
71
+ <td class="developer-label">' . $helper->__('Short Description:') . '</td>
72
+ <td class="developer-text">' .$moduleShortDescription. '</td>
73
+ </tr>
74
+ <tr>
75
+ <td class="developer-label">' . $helper->__('Documentation:') . '</td>
76
+ <td class="developer-text">' . $helper->__(
77
+ 'You can see description of extension features and answers to the ' .
78
+ 'frequently asked questions on <a href="%s" target="_balnk">our website</a>.',
79
+ $moduleLink) . '</td>
80
+ </tr>
81
+ <tr>
82
+ <td class="developer-label line">' . $helper->__('Support:') . '</td>
83
+ <td class="developer-text line">' . $helper->__(
84
+ 'Extension support is available through <a href="%s" target="_blank">issue tracking system' .
85
+ '</a>.<br>You can see information freely, but you will have to sign up to open a ticket.<br>' .
86
+ '<br>Please, report all bugs and feature requests that are connected to this extension.<br>' .
87
+ '<br>If by some reason you can not submit a question, bug report or feature request to our ' .
88
+ 'ticket system, you can write us an email - support@etwebsolutions.com.',
89
+ $moduleSupportLink) . '</td>
90
+ </tr>
91
+ <tr>
92
+ <td class="developer-label line">' . $helper->__('Advertisement:') . '</td>
93
+ <td class="developer-text line">' . $helper->__(
94
+ 'You can hire our team to customize the extension. E-mail us on sales@etwebsolutions.com.<br>' .
95
+ '<br>You can see a list of provided services on <a href="%s" target="_blank">our website</a>.',
96
+ $servicesLink) . '</td>
97
+ </tr>
98
+ </table>';
99
+
100
+
101
+ return $html;
102
+ }
103
+
104
+ protected function _getConfigValue($module, $config)
105
+ {
106
+ $locale = Mage::app()->getLocale()->getLocaleCode();
107
+ $defaultLocale = 'en_US';
108
+ $mainConfig = Mage::getConfig();
109
+ $moduleConfig = $mainConfig->getNode('modules/' . $module . '/' . $config);
110
+
111
+ if ((string)$moduleConfig) {
112
+ return $moduleConfig;
113
+ }
114
+
115
+ if ($moduleConfig->$locale) {
116
+ return $moduleConfig->$locale;
117
+ } else {
118
+ return $moduleConfig->$defaultLocale;
119
+ }
120
+ }
121
+
122
+ }
app/code/community/ET/AdvancedCompare/Block/List.php CHANGED
@@ -1,10 +1,9 @@
1
  <?php
2
  /**
3
- * ET Web Solutions
4
- *
5
  * NOTICE OF LICENSE
6
  *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
 
8
  *
9
  * DISCLAIMER
10
  *
@@ -13,33 +12,31 @@
13
  *
14
  * @category ET
15
  * @package ET_AdvancedCompare
16
- * @copyright Copyright (c) 2011 ET Web Solutions (http://etwebsolutions.com)
17
  * @contacts support@etwebsolutions.com
18
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
19
  */
20
 
21
  class ET_AdvancedCompare_Block_List extends Mage_Catalog_Block_Product_Compare_List
22
  {
23
- public function setTemplate($template)
24
- {
25
- $replacetemplate = Mage::getStoreConfig('advancedcompare/popup/replacetemplate');
26
 
27
- if ($replacetemplate)
28
- {
29
- $version = substr(Mage::getVersion(),0,3);
30
 
31
- switch ($version)
32
- {
33
- case '1.3':
34
- $template = 'et_advancedcompare/list_13x.phtml';
35
- break;
36
 
37
- default:
38
- $template = 'et_advancedcompare/list_15x.phtml';
39
 
40
- }
41
- }
42
 
43
- return parent::setTemplate($template);
44
- }
45
  }
1
  <?php
2
  /**
 
 
3
  * NOTICE OF LICENSE
4
  *
5
+ * You may not sell, sub-license, rent or lease
6
+ * any portion of the Software or Documentation to anyone.
7
  *
8
  * DISCLAIMER
9
  *
12
  *
13
  * @category ET
14
  * @package ET_AdvancedCompare
15
+ * @copyright Copyright (c) 2012 ET Web Solutions (http://etwebsolutions.com)
16
  * @contacts support@etwebsolutions.com
17
+ * @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
18
  */
19
 
20
  class ET_AdvancedCompare_Block_List extends Mage_Catalog_Block_Product_Compare_List
21
  {
22
+ public function setTemplate($template)
23
+ {
24
+ $replacetemplate = Mage::getStoreConfig('advancedcompare/popup/replacetemplate');
25
 
26
+ if ($replacetemplate) {
27
+ $version = substr(Mage::getVersion(), 0, 3);
 
28
 
29
+ switch ($version) {
30
+ case '1.3':
31
+ $template = 'et_advancedcompare/list_13x.phtml';
32
+ break;
 
33
 
34
+ default:
35
+ $template = 'et_advancedcompare/list_15x.phtml';
36
 
37
+ }
38
+ }
39
 
40
+ return parent::setTemplate($template);
41
+ }
42
  }
app/code/community/ET/AdvancedCompare/Helper/Data.php CHANGED
@@ -1,10 +1,9 @@
1
  <?php
2
  /**
3
- * ET Web Solutions
4
- *
5
  * NOTICE OF LICENSE
6
  *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
 
8
  *
9
  * DISCLAIMER
10
  *
@@ -13,26 +12,29 @@
13
  *
14
  * @category ET
15
  * @package ET_AdvancedCompare
16
- * @copyright Copyright (c) 2011 ET Web Solutions (http://etwebsolutions.com)
17
  * @contacts support@etwebsolutions.com
18
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
19
  */
20
 
21
  class ET_AdvancedCompare_Helper_Data extends Mage_Catalog_Helper_Product_Compare
22
  {
23
- /**
24
- * Retrieve url for adding product to conpare list
25
- *
26
- * @param Mage_Catalog_Model_Product $product
27
- * @return string
28
- */
29
- public function getAddUrl($product)
30
- {
31
- $config = Mage::getStoreConfig('advancedcompare/general');
32
-
33
- if (($config['removecompare']) || (($config['removelink']) && ((bool)($product->getData('remove_compare_link')))))
34
- return false;
35
- else
36
- return parent::getAddUrl($product);
37
- }
 
 
 
38
  }
1
  <?php
2
  /**
 
 
3
  * NOTICE OF LICENSE
4
  *
5
+ * You may not sell, sub-license, rent or lease
6
+ * any portion of the Software or Documentation to anyone.
7
  *
8
  * DISCLAIMER
9
  *
12
  *
13
  * @category ET
14
  * @package ET_AdvancedCompare
15
+ * @copyright Copyright (c) 2012 ET Web Solutions (http://etwebsolutions.com)
16
  * @contacts support@etwebsolutions.com
17
+ * @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
18
  */
19
 
20
  class ET_AdvancedCompare_Helper_Data extends Mage_Catalog_Helper_Product_Compare
21
  {
22
+ /**
23
+ * Retrieve url for adding product to conpare list
24
+ *
25
+ * @param Mage_Catalog_Model_Product $product
26
+ * @return string
27
+ */
28
+ public function getAddUrl($product)
29
+ {
30
+ $config = Mage::getStoreConfig('advancedcompare/general');
31
+ if (
32
+ ($config['removecompare'])
33
+ || (($config['removelink']) && ((bool)($product->getData('remove_compare_link'))))
34
+ ) {
35
+ return false;
36
+ } else {
37
+ return parent::getAddUrl($product);
38
+ }
39
+ }
40
  }
app/code/community/ET/AdvancedCompare/Model/Resource/Eav/Mysql4/Product/Compare/Item/Collection.php CHANGED
@@ -1,10 +1,9 @@
1
  <?php
2
  /**
3
- * ET Web Solutions
4
- *
5
  * NOTICE OF LICENSE
6
  *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
 
8
  *
9
  * DISCLAIMER
10
  *
@@ -13,128 +12,156 @@
13
  *
14
  * @category ET
15
  * @package ET_AdvancedCompare
16
- * @copyright Copyright (c) 2011 ET Web Solutions (http://etwebsolutions.com)
17
  * @contacts support@etwebsolutions.com
18
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
19
  */
20
 
21
  // for attribute sorting in compare window
22
 
23
- //class Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Compare_Item_Collection extends Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection
24
- class ET_AdvancedCompare_Model_Resource_Eav_Mysql4_Product_Compare_Item_Collection extends Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Compare_Item_Collection
25
  {
26
 
27
- public function getComparableAttributes()
28
- {
29
- // 1.3.2.3, 1.3.2.4, 1.4.0.0, 1.4.0.1, 1.4.1.1, 1.4.2.0, 1.5.0.1
30
- // проблема с сортировкой точно существовала до версии 1411, дальше надо проверять.
31
- // так как функция менялась в разных версиях, то для 13х и для 14х надо разные функции.
32
-
33
- $sortattributes = Mage::getStoreConfig('advancedcompare/popup/sortattributes');
34
- if ($sortattributes)
35
- $version = substr(Mage::getVersion(),0,3);
36
- else
37
- $version = 'disabled';
38
-
39
- switch ($version)
40
- {
41
- case '1.3':
42
- return $this->getComparableAttributes13x();
43
- break;
44
-
45
- case '1.4':
46
- case '1.5':
47
- return $this->getComparableAttributes14x();
48
- break;
49
-
50
- default:
51
- return parent::getComparableAttributes();
52
- }
53
-
54
-
55
-
56
- }
57
-
58
- public function getComparableAttributes13x()
59
- {
60
- if (is_null($this->_comparableAttributes)) {
61
- $setIds = $this->_getAttributeSetIds();
62
- if ($setIds) {
63
- //$attributeIds = $this->_getAttributeIdsBySetIds($setIds);
64
-
65
- $select = $this->getConnection()->select()
66
- ->from(array('t1' => $this->getTable('eav/attribute')))
67
- ->where('t1.is_comparable=?', 1)
68
- ->joinLeft(array('t2' => $this->getTable('eav/entity_attribute')), 't2.attribute_id=t1.attribute_id')
69
- //->where('t1.attribute_id IN(?)', $attributeIds);
70
- ->where('t2.attribute_set_id IN(?)', $setIds)
71
- ->order(array('t2.attribute_group_id ASC', 't2.sort_order ASC'));
72
-
73
- $attributesData = $this->getConnection()->fetchAll($select);
74
-
75
- if ($attributesData) {
76
- $entityType = 'catalog_product';
77
- Mage::getSingleton('eav/config')
78
- ->importAttributesData($entityType, $attributesData);
79
- foreach ($attributesData as $data) {
80
- $attribute = Mage::getSingleton('eav/config')
81
- ->getAttribute($entityType, $data['attribute_code']);
82
- $this->_comparableAttributes[$attribute->getAttributeCode()] = $attribute;
83
- }
84
- unset($attributesData);
85
- }
86
- }
87
- else {
88
- $this->_comparableAttributes = array();
89
- }
90
- }
91
- return $this->_comparableAttributes;
92
- }
93
-
94
-
95
- public function getComparableAttributes14x()
96
- {
97
- if (is_null($this->_comparableAttributes)) {
98
- $this->_comparableAttributes = array();
99
- $setIds = $this->_getAttributeSetIds();
100
- if ($setIds) {
101
- $attributeIds = $this->_getAttributeIdsBySetIds($setIds);
102
-
103
- $select = $this->getConnection()->select()
104
- ->from(array('main_table' => $this->getTable('eav/attribute')))
105
- ->join(
106
- array('additional_table' => $this->getTable('catalog/eav_attribute')),
107
- 'additional_table.attribute_id=main_table.attribute_id'
108
- )
109
- ->joinLeft(
110
- array('al' => $this->getTable('eav/attribute_label')),
111
- 'al.attribute_id = main_table.attribute_id AND al.store_id = ' . (int) $this->getStoreId(),
112
- array('store_label' => new Zend_Db_Expr('IFNULL(al.value, main_table.frontend_label)'))
113
- )
114
- ->joinLeft(
115
- array('ai' => $this->getTable('eav/entity_attribute')),
116
- 'ai.attribute_id = main_table.attribute_id'
117
- )
118
-
119
- ->where('additional_table.is_comparable=?', 1)
120
- ->where('main_table.attribute_id IN(?)', $attributeIds)
121
- ->order(array('ai.attribute_group_id ASC', 'ai.sort_order ASC'));
122
-
123
- $attributesData = $this->getConnection()->fetchAll($select);
124
- if ($attributesData) {
125
- $entityType = 'catalog_product';
126
- Mage::getSingleton('eav/config')
127
- ->importAttributesData($entityType, $attributesData);
128
- foreach ($attributesData as $data) {
129
- $attribute = Mage::getSingleton('eav/config')
130
- ->getAttribute($entityType, $data['attribute_code']);
131
- $this->_comparableAttributes[$attribute->getAttributeCode()] = $attribute;
132
- }
133
- unset($attributesData);
134
- }
135
- }
136
- }
137
- return $this->_comparableAttributes;
138
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
 
140
  }
1
  <?php
2
  /**
 
 
3
  * NOTICE OF LICENSE
4
  *
5
+ * You may not sell, sub-license, rent or lease
6
+ * any portion of the Software or Documentation to anyone.
7
  *
8
  * DISCLAIMER
9
  *
12
  *
13
  * @category ET
14
  * @package ET_AdvancedCompare
15
+ * @copyright Copyright (c) 2012 ET Web Solutions (http://etwebsolutions.com)
16
  * @contacts support@etwebsolutions.com
17
+ * @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
18
  */
19
 
20
  // for attribute sorting in compare window
21
 
22
+ class ET_AdvancedCompare_Model_Resource_Eav_Mysql4_Product_Compare_Item_Collection
23
+ extends Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Compare_Item_Collection
24
  {
25
 
26
+ public function getComparableAttributes()
27
+ {
28
+ /* 1.3.2.3, 1.3.2.4, 1.4.0.0, 1.4.0.1, 1.4.1.1, 1.4.2.0, 1.5.0.1
29
+ // проблема с сортировкой точно существовала до версии 1411,
30
+ // дальше надо проверять.
31
+ // так как функция менялась в разных версиях, то для 13х и
32
+ // для 14х надо разные функции.
33
+ */
34
+
35
+ $sortattributes = Mage::getStoreConfig('advancedcompare/popup/sortattributes');
36
+ if ($sortattributes) {
37
+ $version = substr(Mage::getVersion(), 0, 3);
38
+ } else {
39
+ $version = 'disabled';
40
+ }
41
+
42
+ switch ($version) {
43
+ case '1.3':
44
+ $returnValue = $this->getComparableAttributes13x();
45
+ break;
46
+
47
+ case '1.4':
48
+ case '1.5':
49
+ case '1.6':
50
+ case '1.7':
51
+ $returnValue = $this->getComparableAttributes14x();
52
+ break;
53
+
54
+ default:
55
+ $returnValue = parent::getComparableAttributes();
56
+ }
57
+ return $returnValue;
58
+ }
59
+
60
+ public function getComparableAttributes13x()
61
+ {
62
+ if (is_null($this->_comparableAttributes)) {
63
+ $setIds = $this->_getAttributeSetIds();
64
+ if ($setIds) {
65
+ //$attributeIds = $this->_getAttributeIdsBySetIds($setIds);
66
+
67
+ $select = $this->getConnection()->select()
68
+ ->from(array('t1' => $this->getTable('eav/attribute')))
69
+ ->where('t1.is_comparable=?', 1)
70
+ ->joinLeft(array(
71
+ 't2' => $this->getTable('eav/entity_attribute')),
72
+ 't2.attribute_id=t1.attribute_id'
73
+ )
74
+ //->where('t1.attribute_id IN(?)', $attributeIds);
75
+ ->where('t2.attribute_set_id IN(?)', $setIds)
76
+ ->order(array('t2.attribute_group_id ASC', 't2.sort_order ASC'));
77
+
78
+ $attributesData = $this->getConnection()->fetchAll($select);
79
+
80
+ if ($attributesData) {
81
+ $entityType = 'catalog_product';
82
+ Mage::getSingleton('eav/config')
83
+ ->importAttributesData($entityType, $attributesData);
84
+ foreach ($attributesData as $data) {
85
+ $attribute = Mage::getSingleton('eav/config')
86
+ ->getAttribute($entityType, $data['attribute_code']);
87
+ $this->_comparableAttributes[$attribute->getAttributeCode()] = $attribute;
88
+ }
89
+ unset($attributesData);
90
+ }
91
+ } else {
92
+ $this->_comparableAttributes = array();
93
+ }
94
+ }
95
+ return $this->_comparableAttributes;
96
+ }
97
+
98
+
99
+ public function getComparableAttributes14x()
100
+ {
101
+ if (is_null($this->_comparableAttributes)) {
102
+ $this->_comparableAttributes = array();
103
+ $setIds = $this->_getAttributeSetIds();
104
+ if ($setIds) {
105
+ $attributeIds = $this->_getAttributeIdsBySetIds($setIds);
106
+
107
+
108
+ $select = $this->getConnection()->select()
109
+ ->from(array('main_table' => $this->getTable('eav/attribute')))
110
+ ->join(
111
+ array('additional_table' => $this->getTable('catalog/eav_attribute')),
112
+ 'additional_table.attribute_id=main_table.attribute_id'
113
+ )
114
+ ->joinLeft(
115
+ array('al' => $this->getTable('eav/attribute_label')),
116
+ 'al.attribute_id = main_table.attribute_id AND al.store_id = ' . (int) $this->getStoreId(),
117
+ array('store_label' => new Zend_Db_Expr('IFNULL(al.value, main_table.frontend_label)'))
118
+ )
119
+ ->joinLeft(
120
+ array('ai' => $this->getTable('eav/entity_attribute')),
121
+ 'ai.attribute_id = main_table.attribute_id'
122
+ )
123
+
124
+
125
+ ->joinLeft(
126
+ array('eea' => $this->getTable('eav/entity_attribute')),
127
+ 'main_table.attribute_id = eea.attribute_id',
128
+ array('eea_sort_order' => 'eea.sort_order')
129
+
130
+ )
131
+
132
+ ->joinLeft(
133
+ array('eag' => $this->getTable('eav/attribute_group')),
134
+ 'eag.attribute_set_id = eea.attribute_set_id
135
+ and eag.attribute_group_id = eea.attribute_group_id',
136
+ array('eag_sort_order' => 'eag.sort_order')
137
+
138
+ )
139
+
140
+
141
+ ->where('additional_table.is_comparable=?', 1)
142
+ ->where("eag.attribute_set_id in (?)", $setIds)
143
+ ->where('main_table.attribute_id IN(?)', $attributeIds)
144
+ ->order(array(
145
+ 'eag_sort_order ASC',
146
+ //'ai.attribute_group_id ASC',
147
+ 'ai.sort_order ASC')
148
+ );
149
+
150
+ $attributesData = $this->getConnection()->fetchAll($select);
151
+ if ($attributesData) {
152
+ $entityType = 'catalog_product';
153
+ Mage::getSingleton('eav/config')
154
+ ->importAttributesData($entityType, $attributesData);
155
+ foreach ($attributesData as $data) {
156
+ $attribute = Mage::getSingleton('eav/config')
157
+ ->getAttribute($entityType, $data['attribute_code']);
158
+ $this->_comparableAttributes[$attribute->getAttributeCode()] = $attribute;
159
+ }
160
+ unset($attributesData);
161
+ }
162
+ }
163
+ }
164
+ return $this->_comparableAttributes;
165
+ }
166
 
167
  }
app/code/community/ET/AdvancedCompare/controllers/IndexController.php CHANGED
@@ -1,10 +1,9 @@
1
  <?php
2
  /**
3
- * ET Web Solutions
4
- *
5
  * NOTICE OF LICENSE
6
  *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
 
8
  *
9
  * DISCLAIMER
10
  *
@@ -13,55 +12,88 @@
13
  *
14
  * @category ET
15
  * @package ET_AdvancedCompare
16
- * @copyright Copyright (c) 2011 ET Web Solutions (http://etwebsolutions.com)
17
  * @contacts support@etwebsolutions.com
18
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
19
  */
20
 
21
  require_once 'Mage/Catalog/controllers/Product/CompareController.php';
22
 
23
  class ET_AdvancedCompare_IndexController extends Mage_Catalog_Product_CompareController
24
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
- public function redrawsidebarAction()
27
- {
28
- $layout=Mage::getSingleton('core/layout');
29
 
30
- $update = $layout->getUpdate();
31
- $renderer=$layout->createBlock('catalog/product_compare_sidebar');
32
- $renderer->setTemplate("catalog/product/compare/sidebar.phtml");
 
33
 
34
- Mage::getSingleton('catalog/session')->getMessages(true);
35
- $rendererhtml=$renderer->toHtml();
 
 
 
 
36
 
37
- $this->getResponse()->setBody(Zend_Json::encode($rendererhtml));
38
- }
 
 
 
 
 
39
 
40
- public function silentaddAction()
41
- {
42
- return $this->addAction();
43
- }
 
 
 
 
 
 
 
 
44
 
45
- public function silentremoveAction()
46
- {
47
- return $this->removeAction();
48
- }
49
 
50
- public function silentclearAction()
51
- {
52
- return $this->clearAction();
53
- }
54
 
55
- protected function _redirectReferer($defaultUrl=null)
56
- {
57
- if(($this->getRequest()->getModuleName()=="advancedcompare")&(in_array($this->getRequest()->getActionName(),array("silentadd","silentremove","silentclear"))))
58
- {
59
- $this->redrawsidebarAction();
60
- }
61
- else
62
- {
63
- parent::_redirectReferer($defaultUrl);
64
- }
65
- }
66
 
 
 
 
 
 
 
 
 
 
 
 
67
  }
1
  <?php
2
  /**
 
 
3
  * NOTICE OF LICENSE
4
  *
5
+ * You may not sell, sub-license, rent or lease
6
+ * any portion of the Software or Documentation to anyone.
7
  *
8
  * DISCLAIMER
9
  *
12
  *
13
  * @category ET
14
  * @package ET_AdvancedCompare
15
+ * @copyright Copyright (c) 2012 ET Web Solutions (http://etwebsolutions.com)
16
  * @contacts support@etwebsolutions.com
17
+ * @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
18
  */
19
 
20
  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
+ {
28
+ $layout = Mage::getSingleton('core/layout');
29
+
30
+ $layout->getUpdate();
31
+ $renderer = $layout->createBlock('catalog/product_compare_sidebar');
32
+ $renderer->setTemplate("catalog/product/compare/sidebar.phtml");
33
+
34
+ Mage::getSingleton('catalog/session')->getMessages(true);
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));
42
+ }
 
43
 
44
+ public function silentaddAction()
45
+ {
46
+ return $this->addAction();
47
+ }
48
 
49
+ public function addAction()
50
+ {
51
+ if (Mage::getStoreConfig('advancedcompare/limits/enable_compare_limits')) {
52
+ $itemCollection = Mage::getResourceModel('catalog/product_compare_item_collection')
53
+ ->useProductItem(true)
54
+ ->setStoreId(Mage::app()->getStore()->getId());
55
 
56
+ if (Mage::getSingleton('customer/session')->isLoggedIn()) {
57
+ $itemCollection->setCustomerId(Mage::getSingleton('customer/session')->getCustomerId());
58
+ } elseif ($this->_customerId) {
59
+ $itemCollection->setCustomerId($this->_customerId);
60
+ } else {
61
+ $itemCollection->setVisitorId(Mage::getSingleton('log/visitor')->getId());
62
+ }
63
 
64
+ Mage::getSingleton('catalog/product_visibility')
65
+ ->addVisibleInSiteFilterToCollection($itemCollection);
66
+ if (count($itemCollection) >= Mage::getStoreConfig('advancedcompare/limits/compare_limits')) {
67
+ $this->_limitMessage = Mage::helper("advancedcompare")->__(
68
+ "You have reached a maximal amount (%s) of products to compare simultaneously",
69
+ Mage::getStoreConfig('advancedcompare/limits/compare_limits')
70
+ );
71
+ return $this->_redirectReferer();
72
+ }
73
+ }
74
+ return parent::addAction();
75
+ }
76
 
 
 
 
 
77
 
78
+ public function silentremoveAction()
79
+ {
80
+ return $this->removeAction();
81
+ }
82
 
83
+ public function silentclearAction()
84
+ {
85
+ return $this->clearAction();
86
+ }
 
 
 
 
 
 
 
87
 
88
+ protected function _redirectReferer($defaultUrl=null)
89
+ {
90
+ if (
91
+ ($this->getRequest()->getModuleName() == "advancedcompare")
92
+ &(in_array($this->getRequest()->getActionName(), array("silentadd", "silentremove", "silentclear")))
93
+ ) {
94
+ $this->redrawsidebarAction();
95
+ } else {
96
+ parent::_redirectReferer($defaultUrl);
97
+ }
98
+ }
99
  }
app/code/community/ET/AdvancedCompare/etc/config.xml CHANGED
@@ -1,181 +1,198 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * ET Web Solutions
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Academic Free License (AFL 3.0)
9
- *
10
- * DISCLAIMER
11
- *
12
- * Do not edit or add to this file if you wish to upgrade to newer
13
- * versions in the future.
14
- *
15
- * @category ET
16
- * @package ET_advancedcompare
17
- * @copyright Copyright (c) 2011 ET Web Solutions (http://etwebsolutions.com)
18
- * @contacts support@etwebsolutions.com
19
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
20
- */
21
- -->
22
- <config>
23
- <modules>
24
- <ET_AdvancedCompare>
25
- <version>0.5.0</version>
26
- <descr>
27
- <ru_RU>
28
- Модуль позволяет отключать возможность добавления товара в список сравнения для каждого товара в отдельности.
29
- Для определения используется значение атрибута remove_compare_link
30
- </ru_RU>
31
- <en_US>
32
- Allows admin to switch off possibility to add product to compare list for each specific product.
33
- Uses attribute remove_compare_link.
34
- </en_US>
35
- </descr>
36
- </ET_AdvancedCompare>
37
- </modules>
38
-
39
- <global>
40
- <rewrite>
41
- <advancedcompare_index>
42
- <from><![CDATA[#^/catalog/product_compare/#]]></from>
43
- <to>/advancedcompare/index/</to>
44
- </advancedcompare_index>
45
- </rewrite>
46
-
47
- <helpers>
48
- <advancedcompare>
49
- <class>ET_AdvancedCompare_Helper</class>
50
- </advancedcompare>
51
- <catalog>
52
- <rewrite>
53
- <product_compare>ET_AdvancedCompare_Helper_Data</product_compare>
54
- </rewrite>
55
- </catalog>
56
- </helpers>
57
-
58
- <blocks>
59
- <advancedcompare>
60
- <class>ET_AdvancedCompare_Block</class>
61
- </advancedcompare>
62
- <catalog>
63
- <rewrite>
64
- <product_compare_list>ET_AdvancedCompare_Block_List</product_compare_list>
65
- </rewrite>
66
- </catalog>
67
- </blocks>
68
-
69
-
70
- <models>
71
- <advancedcompare>
72
- <class>ET_AdvancedCompare_Model</class>
73
- </advancedcompare>
74
- <catalog_resource_eav_mysql4>
75
- <rewrite>
76
- <product_compare_item_collection>ET_AdvancedCompare_Model_Resource_Eav_Mysql4_Product_Compare_Item_Collection</product_compare_item_collection>
77
- </rewrite>
78
- </catalog_resource_eav_mysql4>
79
- </models>
80
-
81
- <resources>
82
- <advancedcompare_setup>
83
- <setup>
84
- <module>ET_AdvancedCompare</module>
85
- <class>Mage_Catalog_Model_Resource_Eav_Mysql4_Setup</class>
86
- </setup>
87
- <connection>
88
- <use>core_setup</use>
89
- </connection>
90
- </advancedcompare_setup>
91
- <advancedcompare_write>
92
- <connection>
93
- <use>core_write</use>
94
- </connection>
95
- </advancedcompare_write>
96
- <advancedcompare_read>
97
- <connection>
98
- <use>core_read</use>
99
- </connection>
100
- </advancedcompare_read>
101
- </resources>
102
- </global>
103
-
104
- <default>
105
- <advancedcompare>
106
- <general>
107
- <removecompare>0</removecompare>
108
- <removelink>1</removelink>
109
- </general>
110
- <noreload>
111
- <enablenorealod>1</enablenorealod>
112
- </noreload>
113
- <popup>
114
- <replacetemplate>0</replacetemplate>
115
- <showlabelafter>3</showlabelafter>
116
- <sortattributes>0</sortattributes>
117
- </popup>
118
- </advancedcompare>
119
- </default>
120
-
121
- <frontend>
122
- <layout>
123
- <updates>
124
- <advancedcompare>
125
- <file>et_advancedcompare.xml</file>
126
- </advancedcompare>
127
- </updates>
128
- </layout>
129
- <routers>
130
- <advancedcompare>
131
- <use>standard</use>
132
- <args>
133
- <module>ET_AdvancedCompare</module>
134
- <frontName>advancedcompare</frontName>
135
- </args>
136
- </advancedcompare>
137
- </routers>
138
- <translate>
139
- <modules>
140
- <ET_AdvancedCompare>
141
- <files>
142
- <default>ET_AdvancedCompare.csv</default>
143
- </files>
144
- </ET_AdvancedCompare>
145
- </modules>
146
- </translate>
147
- </frontend>
148
-
149
- <adminhtml>
150
- <acl>
151
- <resources>
152
- <admin>
153
- <children>
154
- <system>
155
- <children>
156
- <config>
157
- <children>
158
- <advancedcompare translate="title" module="advancedcompare">
159
- <title>ET Advanced Compare Section</title>
160
- <sort_order>400</sort_order>
161
- </advancedcompare>
162
- </children>
163
- </config>
164
- </children>
165
- </system>
166
- </children>
167
- </admin>
168
- </resources>
169
- </acl>
170
- <translate>
171
- <modules>
172
- <ET_AdvancedCompare>
173
- <files>
174
- <default>ET_AdvancedCompare.csv</default>
175
- </files>
176
- </ET_AdvancedCompare>
177
- </modules>
178
- </translate>
179
- </adminhtml>
180
-
181
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * You may not sell, sub-license, rent or lease
7
+ * any portion of the Software or Documentation to anyone.
8
+ *
9
+ * DISCLAIMER
10
+ *
11
+ * Do not edit or add to this file if you wish to upgrade to newer
12
+ * versions in the future.
13
+ *
14
+ * @category ET
15
+ * @package ET_AdvancedCompare
16
+ * @copyright Copyright (c) 2012 ET Web Solutions (http://etwebsolutions.com)
17
+ * @contacts support@etwebsolutions.com
18
+ * @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
19
+ */
20
+ -->
21
+ <config>
22
+ <modules>
23
+ <ET_AdvancedCompare>
24
+ <name>ET Advanced Compare</name>
25
+ <version>1.0.1</version>
26
+ <descr>
27
+ <ru_RU><![CDATA[Реализует работу сравнения без перезагрузки (технология Ajax), улучшает наглядность результатов, а также позволяет отключить функцию сравнения вообще.]]>
28
+ </ru_RU>
29
+ <en_US><![CDATA[Extension allows to add products to compare without page reloading (AJAX), improves visualization of results and allows to switch compare off on your website.]]>
30
+ </en_US>
31
+ </descr>
32
+ <permanentlink>
33
+ <ru_RU>http://shop.etwebsolutions.com/rus/et-advancedcompare.html</ru_RU>
34
+ <en_US>http://shop.etwebsolutions.com/eng/et-advancedcompare.html</en_US>
35
+ </permanentlink>
36
+ <license>
37
+ <ru_RU><![CDATA[ETWS Свободная лицензия (EFL1)]]></ru_RU>
38
+ <en_US><![CDATA[ETWS Free License (EFL1)]]></en_US>
39
+ </license>
40
+ <licenselink>
41
+ <ru_RU>http://shop.etwebsolutions.com/rus/etws-license-free-v1</ru_RU>
42
+ <en_US>http://shop.etwebsolutions.com/eng/etws-license-free-v1</en_US>
43
+ </licenselink>
44
+ <redminelink>http://support.etwebsolutions.com/projects/et-advancedcompare/roadmap</redminelink>
45
+ <ourserviceslink>
46
+ <ru_RU>http://shop.etwebsolutions.com/rus/our-services</ru_RU>
47
+ <en_US>http://shop.etwebsolutions.com/eng/our-services</en_US>
48
+ </ourserviceslink>
49
+ </ET_AdvancedCompare>
50
+ </modules>
51
+
52
+ <global>
53
+ <rewrite>
54
+ <advancedcompare_index>
55
+ <from><![CDATA[#^/catalog/product_compare/#]]></from>
56
+ <to>/advancedcompare/index/</to>
57
+ </advancedcompare_index>
58
+ </rewrite>
59
+
60
+ <helpers>
61
+ <advancedcompare>
62
+ <class>ET_AdvancedCompare_Helper</class>
63
+ </advancedcompare>
64
+ <catalog>
65
+ <rewrite>
66
+ <product_compare>ET_AdvancedCompare_Helper_Data</product_compare>
67
+ </rewrite>
68
+ </catalog>
69
+ </helpers>
70
+
71
+ <blocks>
72
+ <advancedcompare>
73
+ <class>ET_AdvancedCompare_Block</class>
74
+ </advancedcompare>
75
+ <catalog>
76
+ <rewrite>
77
+ <product_compare_list>ET_AdvancedCompare_Block_List</product_compare_list>
78
+ </rewrite>
79
+ </catalog>
80
+ </blocks>
81
+
82
+
83
+ <models>
84
+ <advancedcompare>
85
+ <class>ET_AdvancedCompare_Model</class>
86
+ </advancedcompare>
87
+ <catalog_resource_eav_mysql4>
88
+ <rewrite>
89
+ <product_compare_item_collection>ET_AdvancedCompare_Model_Resource_Eav_Mysql4_Product_Compare_Item_Collection</product_compare_item_collection>
90
+ </rewrite>
91
+ </catalog_resource_eav_mysql4>
92
+ </models>
93
+
94
+ <resources>
95
+ <advancedcompare_setup>
96
+ <setup>
97
+ <module>ET_AdvancedCompare</module>
98
+ <class>Mage_Catalog_Model_Resource_Eav_Mysql4_Setup</class>
99
+ </setup>
100
+ <connection>
101
+ <use>core_setup</use>
102
+ </connection>
103
+ </advancedcompare_setup>
104
+ <advancedcompare_write>
105
+ <connection>
106
+ <use>core_write</use>
107
+ </connection>
108
+ </advancedcompare_write>
109
+ <advancedcompare_read>
110
+ <connection>
111
+ <use>core_read</use>
112
+ </connection>
113
+ </advancedcompare_read>
114
+ </resources>
115
+ </global>
116
+
117
+ <default>
118
+ <advancedcompare>
119
+ <general>
120
+ <removecompare>0</removecompare>
121
+ <removelink>1</removelink>
122
+ </general>
123
+ <noreload>
124
+ <enablenorealod>1</enablenorealod>
125
+ </noreload>
126
+ <limits>
127
+ <enable_compare_limits>0</enable_compare_limits>
128
+ <compare_limits>10</compare_limits>
129
+ </limits>
130
+ <popup>
131
+ <replacetemplate>0</replacetemplate>
132
+ <showlabelafter>3</showlabelafter>
133
+ <sortattributes>0</sortattributes>
134
+ </popup>
135
+ </advancedcompare>
136
+ </default>
137
+
138
+ <frontend>
139
+ <layout>
140
+ <updates>
141
+ <advancedcompare>
142
+ <file>et_advancedcompare.xml</file>
143
+ </advancedcompare>
144
+ </updates>
145
+ </layout>
146
+ <routers>
147
+ <advancedcompare>
148
+ <use>standard</use>
149
+ <args>
150
+ <module>ET_AdvancedCompare</module>
151
+ <frontName>advancedcompare</frontName>
152
+ </args>
153
+ </advancedcompare>
154
+ </routers>
155
+ <translate>
156
+ <modules>
157
+ <ET_AdvancedCompare>
158
+ <files>
159
+ <default>ET_AdvancedCompare.csv</default>
160
+ </files>
161
+ </ET_AdvancedCompare>
162
+ </modules>
163
+ </translate>
164
+ </frontend>
165
+
166
+ <adminhtml>
167
+ <acl>
168
+ <resources>
169
+ <admin>
170
+ <children>
171
+ <system>
172
+ <children>
173
+ <config>
174
+ <children>
175
+ <advancedcompare translate="title" module="advancedcompare">
176
+ <title>ET Advanced Compare Section</title>
177
+ <sort_order>400</sort_order>
178
+ </advancedcompare>
179
+ </children>
180
+ </config>
181
+ </children>
182
+ </system>
183
+ </children>
184
+ </admin>
185
+ </resources>
186
+ </acl>
187
+ <translate>
188
+ <modules>
189
+ <ET_AdvancedCompare>
190
+ <files>
191
+ <default>ET_AdvancedCompare.csv</default>
192
+ </files>
193
+ </ET_AdvancedCompare>
194
+ </modules>
195
+ </translate>
196
+ </adminhtml>
197
+
198
+ </config>
app/code/community/ET/AdvancedCompare/etc/system.xml CHANGED
@@ -1,141 +1,178 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * ET Web Solutions
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Academic Free License (AFL 3.0)
9
- *
10
- * DISCLAIMER
11
- *
12
- * Do not edit or add to this file if you wish to upgrade to newer
13
- * versions in the future.
14
- *
15
- * @category ET
16
- * @package ET_AdvancedCompare
17
- * @copyright Copyright (c) 2011 ET Web Solutions (http://etwebsolutions.com)
18
- * @contacts support@etwebsolutions.com
19
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
20
- */
21
- -->
22
- <config>
23
- <tabs>
24
- <etall translate="label">
25
- <label>ET Extensions</label>
26
- <sort_order>400</sort_order>
27
- </etall>
28
- </tabs>
29
-
30
- <sections>
31
- <advancedcompare translate="label" module="advancedcompare">
32
- <label>Advanced Compare</label>
33
- <tab>etall</tab>
34
- <frontend_type>text</frontend_type>
35
- <sort_order>300</sort_order>
36
- <show_in_default>1</show_in_default>
37
- <show_in_website>1</show_in_website>
38
- <show_in_store>1</show_in_store>
39
- <groups>
40
- <info translate="label">
41
- <label>Advanced Compare information</label>
42
- <comment><![CDATA[Support by support@etwebsolutions.com<br/>You can hire our team to customize this extension to your theme. Contact us at sales@etwebsolutions.com]]></comment>
43
- <frontend_type>text</frontend_type>
44
- <sort_order>1</sort_order>
45
- <show_in_default>1</show_in_default>
46
- <show_in_website>1</show_in_website>
47
- <show_in_store>1</show_in_store>
48
- </info>
49
- <general translate="label">
50
- <label>Remove Compare Options</label>
51
- <frontend_type>text</frontend_type>
52
- <sort_order>10</sort_order>
53
- <show_in_default>1</show_in_default>
54
- <show_in_website>1</show_in_website>
55
- <show_in_store>1</show_in_store>
56
- <fields>
57
- <removecompare translate="label comment">
58
- <label>Remove Compare function</label>
59
- <comment>If Yes - Removes all Add to compare links and compare blok left or right.</comment>
60
- <frontend_type>select</frontend_type>
61
- <source_model>adminhtml/system_config_source_yesno</source_model>
62
- <sort_order>10</sort_order>
63
- <show_in_default>1</show_in_default>
64
- <show_in_website>1</show_in_website>
65
- <show_in_store>1</show_in_store>
66
- </removecompare>
67
- <removelink translate="label comment">
68
- <label>Remove selected links</label>
69
- <comment>If Yes - Add to compare link will be removed for products with attribute remove_compare_link=Yes</comment>
70
- <frontend_type>select</frontend_type>
71
- <source_model>adminhtml/system_config_source_yesno</source_model>
72
- <sort_order>20</sort_order>
73
- <show_in_default>1</show_in_default>
74
- <show_in_website>1</show_in_website>
75
- <show_in_store>1</show_in_store>
76
- </removelink>
77
- </fields>
78
- </general>
79
- <noreload translate="label">
80
- <label>Compare No Reload Options</label>
81
- <frontend_type>text</frontend_type>
82
- <sort_order>20</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
- <fields>
87
- <enablenorealod translate="label comment">
88
- <label>Enable No Reload function</label>
89
- <comment>If Yes - add to compare, remove from compare and clear compare list will work without reloading page.</comment>
90
- <frontend_type>select</frontend_type>
91
- <source_model>adminhtml/system_config_source_yesno</source_model>
92
- <sort_order>10</sort_order>
93
- <show_in_default>1</show_in_default>
94
- <show_in_website>1</show_in_website>
95
- <show_in_store>1</show_in_store>
96
- </enablenorealod>
97
- </fields>
98
- </noreload>
99
- <popup translate="label">
100
- <label>Compare Popup Window Options</label>
101
- <frontend_type>text</frontend_type>
102
- <sort_order>30</sort_order>
103
- <show_in_default>1</show_in_default>
104
- <show_in_website>1</show_in_website>
105
- <show_in_store>1</show_in_store>
106
- <fields>
107
- <replacetemplate translate="label comment">
108
- <label>Replace Popup template</label>
109
- <comment>If Yes - advanced template will be used. Added ability to hide attributes that does not differs.</comment>
110
- <frontend_type>select</frontend_type>
111
- <source_model>adminhtml/system_config_source_yesno</source_model>
112
- <sort_order>10</sort_order>
113
- <show_in_default>1</show_in_default>
114
- <show_in_website>1</show_in_website>
115
- <show_in_store>1</show_in_store>
116
- </replacetemplate>
117
- <showlabelafter translate="label comment">
118
- <label>Show label after</label>
119
- <comment>Shows attribute labels after X products. Default: 3.</comment>
120
- <frontend_type>text</frontend_type>
121
- <sort_order>20</sort_order>
122
- <show_in_default>1</show_in_default>
123
- <show_in_website>1</show_in_website>
124
- <show_in_store>1</show_in_store>
125
- </showlabelafter>
126
- <sortattributes translate="label comment">
127
- <label>Sort attributes</label>
128
- <comment>If Yes - attributes in compare window will be sorted like in attribute set (in some Magento versions there is no sorting by default).</comment>
129
- <frontend_type>select</frontend_type>
130
- <source_model>adminhtml/system_config_source_yesno</source_model>
131
- <sort_order>30</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
- </sortattributes>
136
- </fields>
137
- </popup>
138
- </groups>
139
- </advancedcompare>
140
- </sections>
141
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * You may not sell, sub-license, rent or lease
7
+ * any portion of the Software or Documentation to anyone.
8
+ *
9
+ * DISCLAIMER
10
+ *
11
+ * Do not edit or add to this file if you wish to upgrade to newer
12
+ * versions in the future.
13
+ *
14
+ * @category ET
15
+ * @package ET_AdvancedCompare
16
+ * @copyright Copyright (c) 2012 ET Web Solutions (http://etwebsolutions.com)
17
+ * @contacts support@etwebsolutions.com
18
+ * @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
19
+ */
20
+ -->
21
+ <config>
22
+ <tabs>
23
+ <etall translate="label">
24
+ <label>ET Extensions</label>
25
+ <sort_order>400</sort_order>
26
+ </etall>
27
+ </tabs>
28
+
29
+ <sections>
30
+ <advancedcompare translate="label" module="advancedcompare">
31
+ <label>Advanced Compare</label>
32
+ <tab>etall</tab>
33
+ <frontend_type>text</frontend_type>
34
+ <sort_order>300</sort_order>
35
+ <show_in_default>1</show_in_default>
36
+ <show_in_website>1</show_in_website>
37
+ <show_in_store>1</show_in_store>
38
+ <groups>
39
+ <info translate="label">
40
+ <label>Advanced Compare information</label>
41
+ <sort_order>1</sort_order>
42
+ <show_in_default>1</show_in_default>
43
+ <show_in_website>1</show_in_website>
44
+ <show_in_store>1</show_in_store>
45
+ <fields>
46
+ <support_information>
47
+ <frontend_model>advancedcompare/adminhtml_support</frontend_model>
48
+ <sort_order>100</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
+ </support_information>
53
+ </fields>
54
+ </info>
55
+ <general translate="label">
56
+ <label>Remove Compare Options</label>
57
+ <frontend_type>text</frontend_type>
58
+ <sort_order>10</sort_order>
59
+ <show_in_default>1</show_in_default>
60
+ <show_in_website>1</show_in_website>
61
+ <show_in_store>1</show_in_store>
62
+ <fields>
63
+ <removecompare translate="label comment">
64
+ <label>Remove Compare function</label>
65
+ <comment>If Yes - Removes all Add to compare links and compare blok left or right.</comment>
66
+ <frontend_type>select</frontend_type>
67
+ <source_model>adminhtml/system_config_source_yesno</source_model>
68
+ <sort_order>10</sort_order>
69
+ <show_in_default>1</show_in_default>
70
+ <show_in_website>1</show_in_website>
71
+ <show_in_store>1</show_in_store>
72
+ </removecompare>
73
+ <removelink translate="label comment">
74
+ <label>Remove selected links</label>
75
+ <comment>If Yes - Add to compare link will be removed for products with attribute remove_compare_link=Yes</comment>
76
+ <frontend_type>select</frontend_type>
77
+ <source_model>adminhtml/system_config_source_yesno</source_model>
78
+ <sort_order>20</sort_order>
79
+ <show_in_default>1</show_in_default>
80
+ <show_in_website>1</show_in_website>
81
+ <show_in_store>1</show_in_store>
82
+ </removelink>
83
+ </fields>
84
+ </general>
85
+
86
+ <limits translate="label">
87
+ <label>Limit product comparison</label>
88
+ <frontend_type>text</frontend_type>
89
+ <sort_order>15</sort_order>
90
+ <show_in_default>1</show_in_default>
91
+ <show_in_website>1</show_in_website>
92
+ <show_in_store>1</show_in_store>
93
+ <fields>
94
+ <enable_compare_limits translate="label">
95
+ <label>Limit amount of compared products</label>
96
+ <frontend_type>select</frontend_type>
97
+ <source_model>adminhtml/system_config_source_yesno</source_model>
98
+ <sort_order>30</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
+ </enable_compare_limits>
103
+
104
+ <compare_limits translate="label comment">
105
+ <label>Maximal amount of products to compare</label>
106
+ <comment>Is used, if "Limit amount of compared products" is set to Yes</comment>
107
+ <frontend_type>text</frontend_type>
108
+ <sort_order>40</sort_order>
109
+ <show_in_default>1</show_in_default>
110
+ <show_in_website>1</show_in_website>
111
+ <show_in_store>1</show_in_store>
112
+ </compare_limits>
113
+ </fields>
114
+ </limits>
115
+
116
+ <noreload translate="label">
117
+ <label>Compare No Reload Options</label>
118
+ <frontend_type>text</frontend_type>
119
+ <sort_order>20</sort_order>
120
+ <show_in_default>1</show_in_default>
121
+ <show_in_website>1</show_in_website>
122
+ <show_in_store>1</show_in_store>
123
+ <fields>
124
+ <enablenorealod translate="label comment">
125
+ <label>Enable No Reload function</label>
126
+ <comment>If Yes - add to compare, remove from compare and clear compare list will work without reloading page.</comment>
127
+ <frontend_type>select</frontend_type>
128
+ <source_model>adminhtml/system_config_source_yesno</source_model>
129
+ <sort_order>10</sort_order>
130
+ <show_in_default>1</show_in_default>
131
+ <show_in_website>1</show_in_website>
132
+ <show_in_store>1</show_in_store>
133
+ </enablenorealod>
134
+ </fields>
135
+ </noreload>
136
+ <popup translate="label">
137
+ <label>Compare Popup Window Options</label>
138
+ <frontend_type>text</frontend_type>
139
+ <sort_order>30</sort_order>
140
+ <show_in_default>1</show_in_default>
141
+ <show_in_website>1</show_in_website>
142
+ <show_in_store>1</show_in_store>
143
+ <fields>
144
+ <replacetemplate translate="label comment">
145
+ <label>Replace Popup template</label>
146
+ <comment>If Yes - advanced template will be used. Added ability to hide attributes that does not differs.</comment>
147
+ <frontend_type>select</frontend_type>
148
+ <source_model>adminhtml/system_config_source_yesno</source_model>
149
+ <sort_order>10</sort_order>
150
+ <show_in_default>1</show_in_default>
151
+ <show_in_website>1</show_in_website>
152
+ <show_in_store>1</show_in_store>
153
+ </replacetemplate>
154
+ <showlabelafter translate="label comment">
155
+ <label>Show label after</label>
156
+ <comment>Shows attribute labels after X products. Default: 3.</comment>
157
+ <frontend_type>text</frontend_type>
158
+ <sort_order>20</sort_order>
159
+ <show_in_default>1</show_in_default>
160
+ <show_in_website>1</show_in_website>
161
+ <show_in_store>1</show_in_store>
162
+ </showlabelafter>
163
+ <sortattributes translate="label comment">
164
+ <label>Sort attributes</label>
165
+ <comment>If Yes - attributes in compare window will be sorted like in attribute set (in some Magento versions there is no sorting by default).</comment>
166
+ <frontend_type>select</frontend_type>
167
+ <source_model>adminhtml/system_config_source_yesno</source_model>
168
+ <sort_order>30</sort_order>
169
+ <show_in_default>1</show_in_default>
170
+ <show_in_website>1</show_in_website>
171
+ <show_in_store>1</show_in_store>
172
+ </sortattributes>
173
+ </fields>
174
+ </popup>
175
+ </groups>
176
+ </advancedcompare>
177
+ </sections>
178
+ </config>
app/code/community/ET/AdvancedCompare/sql/advancedcompare_setup/mysql4-install-0.1.php CHANGED
@@ -1,10 +1,9 @@
1
  <?php
2
  /**
3
- * ET Web Solutions
4
- *
5
  * NOTICE OF LICENSE
6
  *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
 
8
  *
9
  * DISCLAIMER
10
  *
@@ -13,9 +12,9 @@
13
  *
14
  * @category ET
15
  * @package ET_AdvancedCompare
16
- * @copyright Copyright (c) 2011 ET Web Solutions (http://etwebsolutions.com)
17
  * @contacts support@etwebsolutions.com
18
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
19
  */
20
 
21
  $installer = $this;
@@ -25,27 +24,27 @@ $installer->startSetup();
25
  $setup = new Mage_Catalog_Model_Resource_Eav_Mysql4_Setup('core_setup');
26
 
27
  $setup->addAttribute('catalog_product', 'remove_compare_link', array(
28
- 'group' => 'General',
29
- 'type' => 'int',
30
- 'backend' => '',
31
- 'frontend' => '',
32
- 'label' => 'Remove Compare Link',
33
- 'note' => '',
34
- 'input' => 'boolean',
35
- 'class' => '',
36
- 'source' => 'eav/entity_attribute_source_boolean',
37
- 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
38
- 'visible' => true,
39
- 'required' => true,
40
- 'user_defined' => true,
41
- 'default' => '0',
42
- 'searchable' => false,
43
- 'filterable' => false,
44
- 'comparable' => false,
45
- 'visible_on_front' => false,
46
- 'is_configurable' => false,
47
- 'used_in_product_listing' => true,
48
- 'unique' => false
49
  ));
50
 
51
  $installer->endSetup();
1
  <?php
2
  /**
 
 
3
  * NOTICE OF LICENSE
4
  *
5
+ * You may not sell, sub-license, rent or lease
6
+ * any portion of the Software or Documentation to anyone.
7
  *
8
  * DISCLAIMER
9
  *
12
  *
13
  * @category ET
14
  * @package ET_AdvancedCompare
15
+ * @copyright Copyright (c) 2012 ET Web Solutions (http://etwebsolutions.com)
16
  * @contacts support@etwebsolutions.com
17
+ * @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
18
  */
19
 
20
  $installer = $this;
24
  $setup = new Mage_Catalog_Model_Resource_Eav_Mysql4_Setup('core_setup');
25
 
26
  $setup->addAttribute('catalog_product', 'remove_compare_link', array(
27
+ 'group' => 'General',
28
+ 'type' => 'int',
29
+ 'backend' => '',
30
+ 'frontend' => '',
31
+ 'label' => 'Remove Compare Link',
32
+ 'note' => '',
33
+ 'input' => 'boolean',
34
+ 'class' => '',
35
+ 'source' => 'eav/entity_attribute_source_boolean',
36
+ 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
37
+ 'visible' => true,
38
+ 'required' => true,
39
+ 'user_defined' => true,
40
+ 'default' => '0',
41
+ 'searchable' => false,
42
+ 'filterable' => false,
43
+ 'comparable' => false,
44
+ 'visible_on_front' => false,
45
+ 'is_configurable' => false,
46
+ 'used_in_product_listing' => true,
47
+ 'unique' => false
48
  ));
49
 
50
  $installer->endSetup();
app/code/community/ET/ET_AdvancedCompare_ChangeLog.txt DELETED
@@ -1,20 +0,0 @@
1
- =====================================
2
- This file describes changes between versions of module ET_AdvancedCompare for Magento.
3
-
4
- Legend:
5
- * bug fix
6
- + added functionality
7
- - removed functionality
8
-
9
- =====================================
10
- TODO:
11
-
12
- =====================================
13
-
14
- ver. 0.5.0
15
- + Added ability to add products to compare list without reloading page (AJAX)
16
- + Added advanced compare product template (only for default design)
17
- + Added attribute sorting in compare window
18
-
19
- ver. 0.1.0
20
- + stable release
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/ET/ET_AdvancedCompare_Description.txt DELETED
@@ -1,75 +0,0 @@
1
- ==== Description / Для чего этот модуль? ====
2
-
3
- EN:
4
- This extension adds some freedom in product comparison management feature.
5
-
6
- Extension features:
7
- 1. Extension allows to disable comparation on your shop (everywhere or on specified store view)
8
- 2. Extension adds attribute remove_compare_link. Depending on its value (Yes/No) the link for adding product to compare is shown or not shown (for example, if you want to forbid adding to compare for products with small attribute amounts - books, video games, etc.)
9
- 3. Extension increases shop performance by allowing customers to work with list of products for comparison without reloading page (add/remove product to list, clear list).
10
- 4. Extension contains advanced template for product comparison page. By default it doesn't display attributes, which values are the same for every product on the page. Customer can switch this feature off and on without reloading the page.
11
- 5. Extension adds sorting by attribute to product compare window (as in attribute set edit form in admin panel).
12
-
13
-
14
- RU:
15
- Модуль расширяет возможности владельца магазина по управлению функцией сравнения товара.
16
-
17
- Функции модуля:
18
- 1. Модуль позволяет отключать функцию сравнения на сайте (везде или на конкретном представлении магазина)
19
- 2. Модуль добавляет атрибут remove_compare_link.
20
- В зависимости от значения этого атрибута (Да/Нет) у товара показывается или нет ссылка на добавление товара в список сравнения (если надо запретить добавлять в сравнение только часть товаров, у которых мало атрибутов. Например книги, компьютерные игры и т.п.)
21
-
22
- 3. Модуль может ускорять работу сайта, так как позволяет работать со списком сравнения без перезагрузки страницы (добавление, удаление и очистка списка)
23
- 4. В комплекте присутствует расширенный шаблон для страницы сравнения
24
- (По умолчанию не показывает атрибуты, значения которых у всех товаров на странице сравнения одинаковое. Пользователь может без перезагрузки страницы включить их просмотр.)
25
- 5. Добавляет сортировку атрибутов в окне сравнения товаров (сортирует как в наборе атрибутов)
26
-
27
-
28
- ====Features / Особенности модуля====
29
-
30
- * Open source code (no encryption and obfuscation)
31
- * Code follows Magento development standards
32
- * Extension is available on 2 languages (ru_RU, en_US) and you can easy add your own
33
- * All extension settings are available on admin panel
34
-
35
- * Открытый исходный код
36
- * Код написан придерживаясь принятых стандартов в разработке для Магенто
37
- * Доступен на 2-ух языках (ru_RU, en_US) и легко добавляются новые переводы
38
- * Все настройки модуля доступны в панели администрирования
39
-
40
-
41
-
42
-
43
- ====Version Compatibility / Совместимость версий====
44
- 1.3.х (tested in 1.3.2.4.)
45
- 1.4.x (tested in 1.4.1.1.)
46
- 1.5.x (tested in 1.5.0.1. 1.5.1.0.)
47
-
48
-
49
- ====Module tags====
50
- disable compare, compare product, remove link, add to cart no reload
51
- ajax add to cart
52
-
53
-
54
-
55
-
56
- ====Установка/Installation====
57
-
58
- * Disable Compiler, if it is enabled (System -> Tools -> Compilation)
59
- * Disable cache, if it is enabled (System -> Cache Management)
60
- * Install the extension
61
- * Log off admin panel (Log Out)
62
- * Log into admin panel (enter your login and password)
63
- * Set Advanced Compare parameters (System -> Configuration -> Advanced Compare)
64
- * Enable compilation and cache if needed
65
- * Rebuild "Rebuild Flat Catalog Product" (actual for versions 1.3.x)
66
-
67
-
68
- * Отключите компиляцию, если включена (Система -> Инструменты -> Компиляция)
69
- * Отключите кэш, если включён (Система -> Управление кэшем)
70
- * Установите модуль
71
- * Выйдите из панели администрирования (Выйти)
72
- * Войдите в панель администрирования (введите логин/пароль)
73
- * Настройте параметры отображения модуля (Система -> Конфигурация -> Advanced Compare)
74
- * Если необходимо включите компиляцию и кэш
75
- * Перестройте "Rebuild Flat Catalog Product" (актуально для версий 1.3.x)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/ET/ET_AdvancedCompare_LICENSE.txt DELETED
@@ -1,48 +0,0 @@
1
- http://opensource.org/licenses/afl-3.0.php
2
-
3
- Academic Free License ("AFL") v. 3.0
4
- This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
5
-
6
- Licensed under the Academic Free License version 3.0
7
-
8
- 1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
9
-
10
- a) to reproduce the Original Work in copies, either alone or as part of a collective work;
11
-
12
- b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
13
-
14
- c) to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License;
15
-
16
- d) to perform the Original Work publicly; and
17
-
18
- e) to display the Original Work publicly.
19
-
20
- 2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
21
-
22
- 3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
23
-
24
- 4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
25
-
26
- 5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
27
-
28
- 6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
29
-
30
- 7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
31
-
32
- 8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
33
-
34
- 9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
35
-
36
- 10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
37
-
38
- 11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
39
-
40
- 12) Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
41
-
42
- 13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
43
-
44
- 14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
45
-
46
- 15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
47
-
48
- 16) Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/base/default/layout/et_advancedcompare.xml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * You may not sell, sub-license, rent or lease
7
+ * any portion of the Software or Documentation to anyone.
8
+ *
9
+ * DISCLAIMER
10
+ *
11
+ * Do not edit or add to this file if you wish to upgrade to newer
12
+ * versions in the future.
13
+ *
14
+ * @category ET
15
+ * @package ET_AdvancedCompare
16
+ * @copyright Copyright (c) 2012 ET Web Solutions (http://etwebsolutions.com)
17
+ * @contacts support@etwebsolutions.com
18
+ * @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
19
+ */
20
+ -->
21
+
22
+ <layout version="0.1.0">
23
+ <default>
24
+ <reference name="head">
25
+ <action method="addItem" ifconfig="advancedcompare/noreload/enablenorealod"><type>skin_js</type><name>js/et_advancedcompare/noreload.js</name></action>
26
+ <action method="addItem" ifconfig="advancedcompare/noreload/enablenorealod"><type>skin_css</type><name>css/et_advancedcompare/noreload.css</name></action>
27
+ </reference>
28
+
29
+ <reference name="right">
30
+ <action method="unsetChild" ifconfig="advancedcompare/general/removecompare"><name>catalog.compare.sidebar</name></action>
31
+ </reference>
32
+ <reference name="left">
33
+ <action method="unsetChild" ifconfig="advancedcompare/general/removecompare"><name>catalog.compare.sidebar</name></action>
34
+ </reference>
35
+ </default>
36
+
37
+ <customer_account>
38
+ <reference name="left">
39
+ <action method="unsetChild" ifconfig="advancedcompare/general/removecompare"><name>catalog.compare.sidebar</name></action>
40
+ </reference>
41
+ <reference name="right">
42
+ <action method="unsetChild" ifconfig="advancedcompare/general/removecompare"><name>catalog.compare.sidebar</name></action>
43
+ </reference>
44
+ </customer_account>
45
+
46
+ </layout>
app/design/frontend/{default → base}/default/template/et_advancedcompare/list_13x.phtml RENAMED
@@ -1,10 +1,9 @@
1
  <?php
2
  /**
3
- * ET Web Solutions
4
- *
5
  * NOTICE OF LICENSE
6
  *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
 
8
  *
9
  * DISCLAIMER
10
  *
@@ -13,58 +12,60 @@
13
  *
14
  * @category ET
15
  * @package ET_AdvancedCompare
16
- * @copyright Copyright (c) 2011 ET Web Solutions (http://etwebsolutions.com)
17
  * @contacts support@etwebsolutions.com
18
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
19
  */
20
 
21
  $show_labels_after = (int)Mage::getStoreConfig('advancedcompare/popup/showlabelafter');
22
- if ($show_labels_after < 1) $show_labels_after = 3;
 
 
23
  $checkbox_label = Mage::helper('advancedcompare')->__('Show similar rows');
24
 
25
 
26
  $rows = array();
27
  foreach ($this->getAttributes() as $_attribute) {
28
- $row_data = array();
29
- $row_data['have_different_values'] = false;
30
- $row_data['html'] = '';
31
-
32
- $first_value = '';
33
- $first_value_set = false;
34
-
35
- $_i = 0;
36
-
37
- foreach($this->getItems() as $_item) {
38
- if($_i++%$show_labels_after==0) {
39
- $row_data['html'] .= '<td class="label">'.$this->__($_attribute->getFrontendLabel()).'</td>';
40
- }
41
- $row_data['html'] .= '<td>';
42
- switch ($_attribute->getAttributeCode()) {
43
- case "price":
44
- $row_data['html'] .= $this->getPriceHtml($_item, true);
45
- break;
46
- case "small_image":
47
- $row_data['html'] .= '<img src="'.$this->helper('catalog/image')->init($_item, 'small_image')->resize(125, 125).'" width="125" height="125" alt="'.$this->htmlEscape($_item->getName()).'" />';
48
- break;
49
- default:
50
- $value = nl2br($this->getProductAttributeValue($_item, $_attribute));
51
- $row_data['html'] .= $value;
52
-
53
- if (!$first_value_set) {
54
- $first_value_set = true;
55
- $first_value = $value;
56
- }
57
-
58
- if ($value != $first_value) {
59
- $row_data['have_different_values'] = true;
60
- }
61
-
62
- break;
63
- }
64
- $row_data['html'] .= '</td>';
65
- }
66
-
67
- $rows[] = $row_data;
68
  }
69
 
70
  ?>
@@ -82,7 +83,7 @@ html { overflow-x:auto !important; }
82
  </style>
83
 
84
  <div class="topcheckbox">
85
- <input type="checkbox" id="chb" onclick="toggleSimilarRows(this.checked);"> <label for="chb"><?=$checkbox_label;?></label>
86
  </div>
87
  <div class="page-head button-level">
88
  <h3><?php echo $this->__('Compare Products') ?></h3>
@@ -129,26 +130,26 @@ html { overflow-x:auto !important; }
129
  <?php endforeach; ?>
130
  </tr>
131
  </tbody>
132
- <tbody id="full" class="hiddenRow">
133
- <? foreach ($rows as $row) : ?>
134
- <? if ($row['have_different_values']) :?>
135
- <tr class="diff">
136
- <? else: ?>
137
- <tr class="similar">
138
- <? endif;?>
139
- <?=$row['html'];?>
140
- </tr>
141
- <? endforeach; ?>
142
- </tbody>
143
- <tbody id="short" class="visibleRow">
144
- <? foreach ($rows as $row) : ?>
145
- <? if ($row['have_different_values']) :?>
146
- <tr>
147
- <?=$row['html'];?>
148
- </tr>
149
- <? endif;?>
150
- <? endforeach; ?>
151
- </tbody>
152
  <tbody class="attribute-cart">
153
  <tr>
154
  <?php $_i=0 ?>
@@ -172,9 +173,9 @@ html { overflow-x:auto !important; }
172
  </tbody>
173
  </table>
174
 
175
- <div class="bottomcheckbox">
176
- <input type="checkbox" id="chb2" onclick="toggleSimilarRows(this.checked);"> <label for="chb2"><?=$checkbox_label;?></label>
177
- </div>
178
 
179
  <div class="button-set">
180
  <button class="form-button" onclick="window.close();"><span><?php echo $this->__('Close Window') ?></span></button>
@@ -184,17 +185,17 @@ html { overflow-x:auto !important; }
184
  decorateTable('product_comparison');
185
 
186
  function toggleSimilarRows(show) {
187
- if (show == true) {
188
- document.getElementById('full').className = 'visibleRow';
189
- document.getElementById('short').className = 'hiddenRow';
190
- document.getElementById('chb').checked = true;
191
- document.getElementById('chb2').checked = true;
192
- } else {
193
- document.getElementById('full').className = 'hiddenRow';
194
- document.getElementById('short').className = 'visibleRow';
195
- document.getElementById('chb').checked = false;
196
- document.getElementById('chb2').checked = false;
197
- }
198
  }
199
  </script>
200
  <?php else: ?>
1
  <?php
2
  /**
 
 
3
  * NOTICE OF LICENSE
4
  *
5
+ * You may not sell, sub-license, rent or lease
6
+ * any portion of the Software or Documentation to anyone.
7
  *
8
  * DISCLAIMER
9
  *
12
  *
13
  * @category ET
14
  * @package ET_AdvancedCompare
15
+ * @copyright Copyright (c) 2012 ET Web Solutions (http://etwebsolutions.com)
16
  * @contacts support@etwebsolutions.com
17
+ * @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
18
  */
19
 
20
  $show_labels_after = (int)Mage::getStoreConfig('advancedcompare/popup/showlabelafter');
21
+ if ($show_labels_after < 1) {
22
+ $show_labels_after = 3;
23
+ }
24
  $checkbox_label = Mage::helper('advancedcompare')->__('Show similar rows');
25
 
26
 
27
  $rows = array();
28
  foreach ($this->getAttributes() as $_attribute) {
29
+ $row_data = array();
30
+ $row_data['have_different_values'] = false;
31
+ $row_data['html'] = '';
32
+
33
+ $first_value = '';
34
+ $first_value_set = false;
35
+
36
+ $_i = 0;
37
+
38
+ foreach($this->getItems() as $_item) {
39
+ if($_i++%$show_labels_after==0) {
40
+ $row_data['html'] .= '<td class="label">'.$this->__($_attribute->getFrontendLabel()).'</td>';
41
+ }
42
+ $row_data['html'] .= '<td>';
43
+ switch ($_attribute->getAttributeCode()) {
44
+ case "price":
45
+ $row_data['html'] .= $this->getPriceHtml($_item, true);
46
+ break;
47
+ case "small_image":
48
+ $row_data['html'] .= '<img src="'.$this->helper('catalog/image')->init($_item, 'small_image')->resize(125, 125).'" width="125" height="125" alt="'.$this->htmlEscape($_item->getName()).'" />';
49
+ break;
50
+ default:
51
+ $value = nl2br($this->getProductAttributeValue($_item, $_attribute));
52
+ $row_data['html'] .= $value;
53
+
54
+ if (!$first_value_set) {
55
+ $first_value_set = true;
56
+ $first_value = $value;
57
+ }
58
+
59
+ if ($value != $first_value) {
60
+ $row_data['have_different_values'] = true;
61
+ }
62
+
63
+ break;
64
+ }
65
+ $row_data['html'] .= '</td>';
66
+ }
67
+
68
+ $rows[] = $row_data;
69
  }
70
 
71
  ?>
83
  </style>
84
 
85
  <div class="topcheckbox">
86
+ <input type="checkbox" id="chb" onclick="toggleSimilarRows(this.checked);"> <label for="chb"><?=$checkbox_label;?></label>
87
  </div>
88
  <div class="page-head button-level">
89
  <h3><?php echo $this->__('Compare Products') ?></h3>
130
  <?php endforeach; ?>
131
  </tr>
132
  </tbody>
133
+ <tbody id="full" class="hiddenRow">
134
+ <? foreach ($rows as $row) : ?>
135
+ <? if ($row['have_different_values']) :?>
136
+ <tr class="diff">
137
+ <? else: ?>
138
+ <tr class="similar">
139
+ <? endif;?>
140
+ <?=$row['html'];?>
141
+ </tr>
142
+ <? endforeach; ?>
143
+ </tbody>
144
+ <tbody id="short" class="visibleRow">
145
+ <? foreach ($rows as $row) : ?>
146
+ <? if ($row['have_different_values']) :?>
147
+ <tr>
148
+ <?=$row['html'];?>
149
+ </tr>
150
+ <? endif;?>
151
+ <? endforeach; ?>
152
+ </tbody>
153
  <tbody class="attribute-cart">
154
  <tr>
155
  <?php $_i=0 ?>
173
  </tbody>
174
  </table>
175
 
176
+ <div class="bottomcheckbox">
177
+ <input type="checkbox" id="chb2" onclick="toggleSimilarRows(this.checked);"> <label for="chb2"><?=$checkbox_label;?></label>
178
+ </div>
179
 
180
  <div class="button-set">
181
  <button class="form-button" onclick="window.close();"><span><?php echo $this->__('Close Window') ?></span></button>
185
  decorateTable('product_comparison');
186
 
187
  function toggleSimilarRows(show) {
188
+ if (show == true) {
189
+ document.getElementById('full').className = 'visibleRow';
190
+ document.getElementById('short').className = 'hiddenRow';
191
+ document.getElementById('chb').checked = true;
192
+ document.getElementById('chb2').checked = true;
193
+ } else {
194
+ document.getElementById('full').className = 'hiddenRow';
195
+ document.getElementById('short').className = 'visibleRow';
196
+ document.getElementById('chb').checked = false;
197
+ document.getElementById('chb2').checked = false;
198
+ }
199
  }
200
  </script>
201
  <?php else: ?>
app/design/frontend/{default → base}/default/template/et_advancedcompare/list_15x.phtml RENAMED
@@ -1,10 +1,9 @@
1
  <?php
2
  /**
3
- * ET Web Solutions
4
- *
5
  * NOTICE OF LICENSE
6
  *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
 
8
  *
9
  * DISCLAIMER
10
  *
@@ -13,65 +12,73 @@
13
  *
14
  * @category ET
15
  * @package ET_AdvancedCompare
16
- * @copyright Copyright (c) 2011 ET Web Solutions (http://etwebsolutions.com)
17
  * @contacts support@etwebsolutions.com
18
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
19
  */
20
 
21
  /* @var $this Mage_Catalog_Block_Product_Compare_List */
22
 
23
  $show_labels_after = (int)Mage::getStoreConfig('advancedcompare/popup/showlabelafter');
24
- if ($show_labels_after < 1) $show_labels_after = 3;
25
- $checkbox_label = Mage::helper('advancedcompare')->__('Show similar rows');
 
26
 
 
 
27
 
28
  $rows = array();
29
  foreach ($this->getAttributes() as $_attribute) {
30
- $row_data = array();
31
- $row_data['have_different_values'] = false;
32
- $row_data['html'] = '';
33
-
34
- $first_value = '';
35
- $first_value_set = false;
36
-
37
- $_i = 0;
38
-
39
- foreach($this->getItems() as $_item) {
40
- if($_i++%$show_labels_after==0) {
41
- $row_data['html'] .= '<th><span class="nobr">'.$_attribute->getStoreLabel().'</span></th>';
42
- }
43
- $row_data['html'] .= '<td>';
44
- switch ($_attribute->getAttributeCode()) {
45
- case "price":
46
- $row_data['html'] .= $this->getPriceHtml($_item, true, '-compare-list-' . $_attribute->getCode());
47
- break;
48
- case "small_image":
49
- $row_data['html'] .= '<img src="'.$this->helper('catalog/image')->init($_item, 'small_image')->resize(125, 125).'" width="125" height="125" alt="'.$this->htmlEscape($_item->getName()).'" title="'.$this->htmlEscape($_item->getName()).'" />';
50
- break;
51
- case "date":
52
- $row_data['html'] .= substr($this->getProductAttributeValue($_item, $_attribute),0,10);
53
- break;
54
- default:
55
- $value = $this->helper('catalog/output')->productAttribute($_item, $this->getProductAttributeValue($_item, $_attribute), $_attribute->getCode());
56
- $row_data['html'] .= $value;
57
-
58
- if (!$first_value_set) {
59
- $first_value_set = true;
60
- $first_value = $value;
61
- }
62
-
63
- if ($value != $first_value) {
64
- $row_data['have_different_values'] = true;
65
- }
66
-
67
- break;
68
- }
69
- $row_data['html'] .= '</td>';
70
- }
71
-
72
- $rows[] = $row_data;
73
- }
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  ?>
76
 
77
 
@@ -89,7 +96,7 @@ html { overflow-x:auto !important; }
89
 
90
 
91
  <div class="topcheckbox">
92
- <input type="checkbox" id="chb" onclick="toggleSimilarRows(this.checked);"> <label for="chb"><?=$checkbox_label;?></label>
93
  </div>
94
  <div class="page-title title-buttons">
95
  <h1><?php echo $this->__('Compare Products') ?></h1>
@@ -145,26 +152,42 @@ html { overflow-x:auto !important; }
145
  <?php endforeach; ?>
146
  </tr>
147
  </tbody>
148
- <tbody id="full" class="hiddenRow">
149
- <? foreach ($rows as $row) : ?>
150
- <? if ($row['have_different_values']) :?>
151
- <tr class="diff">
152
- <? else: ?>
153
- <tr class="similar">
154
- <? endif;?>
155
- <?=$row['html'];?>
156
- </tr>
157
- <? endforeach; ?>
158
- </tbody>
159
- <tbody id="short" class="visibleRow">
160
- <? foreach ($rows as $row) : ?>
161
- <? if ($row['have_different_values']) :?>
162
- <tr>
163
- <?=$row['html'];?>
164
- </tr>
165
- <? endif;?>
166
- <? endforeach; ?>
167
- </tbody>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  <tbody>
169
  <tr class="add-to-row">
170
  <?php $_i=0 ?>
@@ -189,9 +212,9 @@ html { overflow-x:auto !important; }
189
  </tr>
190
  </tbody>
191
  </table>
192
- <div class="bottomcheckbox">
193
- <input type="checkbox" id="chb2" onclick="toggleSimilarRows(this.checked);"> <label for="chb2"><?=$checkbox_label;?></label>
194
- </div>
195
  <div class="buttons-set">
196
  <button type="button" title="<?php echo $this->__('Close Window') ?>" class="button" onclick="window.close();"><span><span><?php echo $this->__('Close Window') ?></span></span></button>
197
  <span class="please-wait" id="compare-list-please-wait" style="display:none;">
@@ -219,19 +242,19 @@ html { overflow-x:auto !important; }
219
  });
220
  }
221
 
222
- function toggleSimilarRows(show) {
223
- if (show == true) {
224
- document.getElementById('full').className = 'visibleRow';
225
- document.getElementById('short').className = 'hiddenRow';
226
- document.getElementById('chb').checked = true;
227
- document.getElementById('chb2').checked = true;
228
- } else {
229
- document.getElementById('full').className = 'hiddenRow';
230
- document.getElementById('short').className = 'visibleRow';
231
- document.getElementById('chb').checked = false;
232
- document.getElementById('chb2').checked = false;
233
- }
234
- }
235
  </script>
236
  <?php else: ?>
237
  <script type="text/javascript">window.close();</script>
1
  <?php
2
  /**
 
 
3
  * NOTICE OF LICENSE
4
  *
5
+ * You may not sell, sub-license, rent or lease
6
+ * any portion of the Software or Documentation to anyone.
7
  *
8
  * DISCLAIMER
9
  *
12
  *
13
  * @category ET
14
  * @package ET_AdvancedCompare
15
+ * @copyright Copyright (c) 2012 ET Web Solutions (http://etwebsolutions.com)
16
  * @contacts support@etwebsolutions.com
17
+ * @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
18
  */
19
 
20
  /* @var $this Mage_Catalog_Block_Product_Compare_List */
21
 
22
  $show_labels_after = (int)Mage::getStoreConfig('advancedcompare/popup/showlabelafter');
23
+ if ($show_labels_after < 1) {
24
+ $show_labels_after = 3;
25
+ }
26
 
27
+ $checkbox_label = Mage::helper('advancedcompare')->__('Show similar rows');
28
+ $skipempty = false;
29
 
30
  $rows = array();
31
  foreach ($this->getAttributes() as $_attribute) {
32
+ $row_data = array();
33
+ $row_data['have_different_values'] = false;
34
+ $row_data['skip_empty_row'] = false;
35
+ $row_data['html'] = '';
36
+
37
+ $first_value = '';
38
+ $first_value_set = false;
39
+
40
+ $_i = 0;
41
+
42
+ foreach($this->getItems() as $_item) {
43
+ if($_i++%$show_labels_after==0) {
44
+ $row_data['html'] .= '<th><span class="nobr">'.$_attribute->getStoreLabel().'</span></th>';
45
+ }
46
+ $row_data['html'] .= '<td>';
47
+ switch ($_attribute->getAttributeCode()) {
48
+ case "price":
49
+ $row_data['html'] .= $this->getPriceHtml($_item, true, '-compare-list-' . $_attribute->getCode());
50
+ break;
51
+ case "small_image":
52
+ $row_data['html'] .= '<img src="'.$this->helper('catalog/image')->init($_item, 'small_image')->resize(125, 125).'" width="125" height="125" alt="'.$this->htmlEscape($_item->getName()).'" title="'.$this->htmlEscape($_item->getName()).'" />';
53
+ break;
54
+ case "date":
55
+ $row_data['html'] .= substr($this->getProductAttributeValue($_item, $_attribute),0,10);
56
+ break;
57
+ default:
58
+ $value = $this->helper('catalog/output')->productAttribute($_item, $this->getProductAttributeValue($_item, $_attribute), $_attribute->getCode());
59
+ $row_data['html'] .= $value;
60
+
61
+ if (!$first_value_set) {
62
+ $first_value_set = true;
63
+ $first_value = $value;
64
+ }
 
 
 
 
 
 
 
 
 
 
 
65
 
66
+ if ($value != $first_value) {
67
+ $row_data['have_different_values'] = true;
68
+ $row_data['skip_empty_row'] = false;
69
+ }
70
+
71
+ if (($skipempty) && (!$_item->hasData($_attribute->getAttributeCode()))) {
72
+ $row_data['skip_empty_row'] = !$row_data['have_different_values'];
73
+ }
74
+
75
+ break;
76
+ }
77
+ $row_data['html'] .= '</td>';
78
+ }
79
+
80
+ $rows[] = $row_data;
81
+ }
82
  ?>
83
 
84
 
96
 
97
 
98
  <div class="topcheckbox">
99
+ <input type="checkbox" id="chb" onclick="toggleSimilarRows(this.checked);"> <label for="chb"><?=$checkbox_label;?></label>
100
  </div>
101
  <div class="page-title title-buttons">
102
  <h1><?php echo $this->__('Compare Products') ?></h1>
152
  <?php endforeach; ?>
153
  </tr>
154
  </tbody>
155
+
156
+
157
+ <tbody id="full" class="hiddenRow">
158
+ <? foreach ($rows as $row) : ?>
159
+
160
+ <? if (!$row['skip_empty_row']) :?>
161
+ <? if ($row['have_different_values']) :?>
162
+ <tr class="diff">
163
+ <? else: ?>
164
+ <tr class="similar">
165
+ <? endif;?>
166
+ <?=$row['html'];?>
167
+ </tr>
168
+ <? endif;?>
169
+
170
+
171
+ <? endforeach; ?>
172
+ </tbody>
173
+ <tbody id="short" class="visibleRow">
174
+ <? foreach ($rows as $row) : ?>
175
+
176
+ <? if (!$row['skip_empty_row']) :?>
177
+
178
+
179
+ <? if ($row['have_different_values']) :?>
180
+ <tr>
181
+ <?=$row['html'];?>
182
+ </tr>
183
+ <? endif;?>
184
+
185
+ <? endif;?>
186
+
187
+
188
+ <? endforeach; ?>
189
+ </tbody>
190
+
191
  <tbody>
192
  <tr class="add-to-row">
193
  <?php $_i=0 ?>
212
  </tr>
213
  </tbody>
214
  </table>
215
+ <div class="bottomcheckbox">
216
+ <input type="checkbox" id="chb2" onclick="toggleSimilarRows(this.checked);"> <label for="chb2"><?=$checkbox_label;?></label>
217
+ </div>
218
  <div class="buttons-set">
219
  <button type="button" title="<?php echo $this->__('Close Window') ?>" class="button" onclick="window.close();"><span><span><?php echo $this->__('Close Window') ?></span></span></button>
220
  <span class="please-wait" id="compare-list-please-wait" style="display:none;">
242
  });
243
  }
244
 
245
+ function toggleSimilarRows(show) {
246
+ if (show == true) {
247
+ document.getElementById('full').className = 'visibleRow';
248
+ document.getElementById('short').className = 'hiddenRow';
249
+ document.getElementById('chb').checked = true;
250
+ document.getElementById('chb2').checked = true;
251
+ } else {
252
+ document.getElementById('full').className = 'hiddenRow';
253
+ document.getElementById('short').className = 'visibleRow';
254
+ document.getElementById('chb').checked = false;
255
+ document.getElementById('chb2').checked = false;
256
+ }
257
+ }
258
  </script>
259
  <?php else: ?>
260
  <script type="text/javascript">window.close();</script>
app/design/frontend/default/default/layout/et_advancedcompare.xml DELETED
@@ -1,47 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * ET Web Solutions
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Academic Free License (AFL 3.0)
9
- *
10
- * DISCLAIMER
11
- *
12
- * Do not edit or add to this file if you wish to upgrade to newer
13
- * versions in the future.
14
- *
15
- * @category ET
16
- * @package ET_AdvancedCompare
17
- * @copyright Copyright (c) 2011 ET Web Solutions (http://etwebsolutions.com)
18
- * @contacts support@etwebsolutions.com
19
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
20
- */
21
- -->
22
-
23
- <layout version="0.1.0">
24
- <default>
25
- <reference name="head">
26
- <action method="addItem" ifconfig="advancedcompare/noreload/enablenorealod"><type>skin_js</type><name>js/noreload.js</name></action>
27
- <action method="addItem" ifconfig="advancedcompare/noreload/enablenorealod"><type>skin_css</type><name>css/noreload.css</name></action>
28
- </reference>
29
-
30
- <reference name="right">
31
- <action method="unsetChild" ifconfig="advancedcompare/general/removecompare"><name>catalog.compare.sidebar</name></action>
32
- </reference>
33
- <reference name="left">
34
- <action method="unsetChild" ifconfig="advancedcompare/general/removecompare"><name>catalog.compare.sidebar</name></action>
35
- </reference>
36
- </default>
37
-
38
- <customer_account>
39
- <reference name="left">
40
- <action method="unsetChild" ifconfig="advancedcompare/general/removecompare"><name>catalog.compare.sidebar</name></action>
41
- </reference>
42
- <reference name="right">
43
- <action method="unsetChild" ifconfig="advancedcompare/general/removecompare"><name>catalog.compare.sidebar</name></action>
44
- </reference>
45
- </customer_account>
46
-
47
- </layout>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/etc/modules/ET_AdvancedCompare.xml CHANGED
@@ -1,11 +1,10 @@
1
  <?xml version="1.0"?>
2
- <!--
3
  /**
4
- * ET Web Solutions
5
- *
6
  * NOTICE OF LICENSE
7
  *
8
- * This source file is subject to the Academic Free License (AFL 3.0)
 
9
  *
10
  * DISCLAIMER
11
  *
@@ -14,20 +13,20 @@
14
  *
15
  * @category ET
16
  * @package ET_AdvancedCompare
17
- * @copyright Copyright (c) 2011 ET Web Solutions (http://etwebsolutions.com)
18
  * @contacts support@etwebsolutions.com
19
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
20
- */
21
  -->
22
 
23
  <config>
24
- <modules>
25
- <ET_AdvancedCompare>
26
- <active>true</active>
27
- <codePool>community</codePool>
28
- <depends>
29
- <Mage_Catalog/>
30
- </depends>
31
- </ET_AdvancedCompare>
32
- </modules>
33
  </config>
1
  <?xml version="1.0"?>
2
+ <!--
3
  /**
 
 
4
  * NOTICE OF LICENSE
5
  *
6
+ * You may not sell, sub-license, rent or lease
7
+ * any portion of the Software or Documentation to anyone.
8
  *
9
  * DISCLAIMER
10
  *
13
  *
14
  * @category ET
15
  * @package ET_AdvancedCompare
16
+ * @copyright Copyright (c) 2012 ET Web Solutions (http://etwebsolutions.com)
17
  * @contacts support@etwebsolutions.com
18
+ * @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
19
+ */
20
  -->
21
 
22
  <config>
23
+ <modules>
24
+ <ET_AdvancedCompare>
25
+ <active>true</active>
26
+ <codePool>community</codePool>
27
+ <depends>
28
+ <Mage_Catalog/>
29
+ </depends>
30
+ </ET_AdvancedCompare>
31
+ </modules>
32
  </config>
app/locale/en_US/ET_AdvancedCompare.csv CHANGED
@@ -5,7 +5,7 @@
5
  "If Yes - Removes all Add to compare links and compare blok left or right.","If Yes - Removes all Add to compare links and compare block from left or right."
6
  "Remove selected links","Remove selected links"
7
  "If Yes - Add to compare link will be removed for products with attribute remove_compare_link=Yes","If Yes - Add to compare link will be removed for products with attribute remove_compare_link=Yes"
8
- "Compare No Reload Options","Compare No Reload Options"
9
  "Enable No Reload function","Enable No Reload function"
10
  "If Yes - add to compare, remove from compare and clear compare list will work without reloading page.","If Yes - add to compare, remove from compare and clear compare list will work without reloading page."
11
  "Compare Popup Window Options","Compare Popup Window Options"
@@ -16,3 +16,8 @@
16
  "Shows attribute labels after X products. Default: 3.","Shows attribute labels after X products. Default: 3."
17
  "Sort attributes","Sort attributes"
18
  "If Yes - attributes in compare window will be sorted like in attribute set (in some Magento versions there is no sorting by default).","If Yes - attributes in compare window will be sorted like in attribute set (in some Magento versions there is no sorting by default)."
 
 
 
 
 
5
  "If Yes - Removes all Add to compare links and compare blok left or right.","If Yes - Removes all Add to compare links and compare block from left or right."
6
  "Remove selected links","Remove selected links"
7
  "If Yes - Add to compare link will be removed for products with attribute remove_compare_link=Yes","If Yes - Add to compare link will be removed for products with attribute remove_compare_link=Yes"
8
+ "Compare No Reload Options","Compare No Reload Options (AJAX)"
9
  "Enable No Reload function","Enable No Reload function"
10
  "If Yes - add to compare, remove from compare and clear compare list will work without reloading page.","If Yes - add to compare, remove from compare and clear compare list will work without reloading page."
11
  "Compare Popup Window Options","Compare Popup Window Options"
16
  "Shows attribute labels after X products. Default: 3.","Shows attribute labels after X products. Default: 3."
17
  "Sort attributes","Sort attributes"
18
  "If Yes - attributes in compare window will be sorted like in attribute set (in some Magento versions there is no sorting by default).","If Yes - attributes in compare window will be sorted like in attribute set (in some Magento versions there is no sorting by default)."
19
+ "Limit product comparison","Limit product comparison"
20
+ "Limit amount of compared products","Limit amount of compared products"
21
+ "Maximal amount of products to compare","Maximal amount of products to compare"
22
+ "Is used, if ""Limit amount of compared products"" is set to Yes","Is used, if ""Limit amount of compared products"" is set to Yes"
23
+ "You have reached a maximal amount (%s) of products to compare simultaneously","You have reached a maximal amount (%s) of products to compare simultaneously"
app/locale/lv_LV/ET_AdvancedCompare.csv CHANGED
@@ -5,7 +5,7 @@
5
  "If Yes - Removes all Add to compare links and compare blok left or right.","Jā - netiks rādītas visas saites pievienot salīdzināšanai un bloks ar precēm, kas pievienotas salīdzināšanai labajā un kreisajā pusē."
6
  "Remove selected links","Nerādīt izvēlētās saites"
7
  "If Yes - Add to compare link will be removed for products with attribute remove_compare_link=Yes","Jā - netiks rādītas saites pievienot salīdzināšanai precēm, kam atribūta remove_compare_link vērtība vienāda jā"
8
- "Compare No Reload Options","Salīdzināšana bez lapas pārlādes. Opcijas"
9
  "Enable No Reload function","Ieslēgt salīdzināšanu bez pārlādes"
10
  "If Yes - add to compare, remove from compare and clear compare list will work without reloading page.","Jā - pievienot salīdzināšanai, izslēgt no salīdzināšanas un dzēst salīdzināšanas sarakstu darbosies bez lapas pārlādes."
11
  "Compare Popup Window Options","Preču salīdzināšanas logs. Opcijas"
@@ -16,3 +16,8 @@
16
  "Shows attribute labels after X products. Default: 3.","Parādīt kolonnu ar atribūta nosaukumiem pēc katrām Х precēm. Pēc noklusēšanas: 3."
17
  "Sort attributes","Sortēt atribūtus"
18
  "If Yes - attributes in compare window will be sorted like in attribute set (in some Magento versions there is no sorting by default).","Jā - atribūti salīzināšanas logā tiks sortēti kā atribūtu kopumā (dažās Magento versijās atribūti netiek sortēti)."
 
 
 
 
 
5
  "If Yes - Removes all Add to compare links and compare blok left or right.","Jā - netiks rādītas visas saites pievienot salīdzināšanai un bloks ar precēm, kas pievienotas salīdzināšanai labajā un kreisajā pusē."
6
  "Remove selected links","Nerādīt izvēlētās saites"
7
  "If Yes - Add to compare link will be removed for products with attribute remove_compare_link=Yes","Jā - netiks rādītas saites pievienot salīdzināšanai precēm, kam atribūta remove_compare_link vērtība vienāda jā"
8
+ "Compare No Reload Options","Salīdzināšana bez lapas pārlādes (AJAX). Opcijas"
9
  "Enable No Reload function","Ieslēgt salīdzināšanu bez pārlādes"
10
  "If Yes - add to compare, remove from compare and clear compare list will work without reloading page.","Jā - pievienot salīdzināšanai, izslēgt no salīdzināšanas un dzēst salīdzināšanas sarakstu darbosies bez lapas pārlādes."
11
  "Compare Popup Window Options","Preču salīdzināšanas logs. Opcijas"
16
  "Shows attribute labels after X products. Default: 3.","Parādīt kolonnu ar atribūta nosaukumiem pēc katrām Х precēm. Pēc noklusēšanas: 3."
17
  "Sort attributes","Sortēt atribūtus"
18
  "If Yes - attributes in compare window will be sorted like in attribute set (in some Magento versions there is no sorting by default).","Jā - atribūti salīzināšanas logā tiks sortēti kā atribūtu kopumā (dažās Magento versijās atribūti netiek sortēti)."
19
+ "Limit product comparison","Salīdzināšanas saraksta ierobežojums"
20
+ "Limit amount of compared products","Ierobežot sarakstu"
21
+ "Maximal amount of products to compare","Maksimālais preču daudzums sarakstā"
22
+ "Is used, if ""Limit amount of compared products"" is set to Yes","Darbojas gadījumā, ja izvelvēta opcija ""Ierobežot sarakstu"""
23
+ "You have reached a maximal amount (%s) of products to compare simultaneously","Salīdzināšanas saraksts ierobežots. Maksimālais preču daudzums sarakstā (%s)"
app/locale/ru_RU/ET_AdvancedCompare.csv CHANGED
@@ -5,7 +5,7 @@
5
  "If Yes - Removes all Add to compare links and compare blok left or right.","Если Да - будут скрыты все ссылки Добавить в сравнение и блок со списком товаров для сравнения слева или справа."
6
  "Remove selected links","Удалить выбранные ссылки"
7
  "If Yes - Add to compare link will be removed for products with attribute remove_compare_link=Yes","Если Да - будут скрыты ссылки Добавить в сравнение для товаров, у которых значение атрибута remove_compare_link=Да"
8
- "Compare No Reload Options","Сравнение без перезагрузки. Параметры"
9
  "Enable No Reload function","Включить Сравнение без перезагрузки"
10
  "If Yes - add to compare, remove from compare and clear compare list will work without reloading page.","Если Да - функции Добавить в сравнение, Удалить из сравнения и очистить список сравнения будут работать без перезагрузки страницы."
11
  "Compare Popup Window Options","Окно сравнения товаров. Параметры"
@@ -16,3 +16,19 @@
16
  "Shows attribute labels after X products. Default: 3.","Показывает колонку с названиями атрибутов после каждых Х товаров. По умолчанию: 3."
17
  "Sort attributes","Сортировать атрибуты"
18
  "If Yes - attributes in compare window will be sorted like in attribute set (in some Magento versions there is no sorting by default).","Если Да - атрибуты в окне сравнения будут отсортированы как в наборе атрибутов (в некоторых версиях Мадженто сортировка отсутствует)."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  "If Yes - Removes all Add to compare links and compare blok left or right.","Если Да - будут скрыты все ссылки Добавить в сравнение и блок со списком товаров для сравнения слева или справа."
6
  "Remove selected links","Удалить выбранные ссылки"
7
  "If Yes - Add to compare link will be removed for products with attribute remove_compare_link=Yes","Если Да - будут скрыты ссылки Добавить в сравнение для товаров, у которых значение атрибута remove_compare_link=Да"
8
+ "Compare No Reload Options","Сравнение без перезагрузки (AJAX). Параметры"
9
  "Enable No Reload function","Включить Сравнение без перезагрузки"
10
  "If Yes - add to compare, remove from compare and clear compare list will work without reloading page.","Если Да - функции Добавить в сравнение, Удалить из сравнения и очистить список сравнения будут работать без перезагрузки страницы."
11
  "Compare Popup Window Options","Окно сравнения товаров. Параметры"
16
  "Shows attribute labels after X products. Default: 3.","Показывает колонку с названиями атрибутов после каждых Х товаров. По умолчанию: 3."
17
  "Sort attributes","Сортировать атрибуты"
18
  "If Yes - attributes in compare window will be sorted like in attribute set (in some Magento versions there is no sorting by default).","Если Да - атрибуты в окне сравнения будут отсортированы как в наборе атрибутов (в некоторых версиях Мадженто сортировка отсутствует)."
19
+ "Limit product comparison","Ограничение списка сравнения"
20
+ "Limit amount of compared products","Ограничить кол-во товаров в списке"
21
+ "Maximal amount of products to compare","Максимальное кол-во товаров в списке"
22
+ "Is used, if ""Limit amount of compared products"" is set to Yes","Работает только при включённом параметре ""Ограничить кол-во товаров в списке"""
23
+ "You have reached a maximal amount (%s) of products to compare simultaneously","Список сравнения ограничен. Максимальное количество товаров в списке (%s)"
24
+
25
+ "Extension:","Модуль:"
26
+ "<strong>%s</strong> (version %s)","<strong>%s</strong> (версия %s)"
27
+ "License:","Лицензия:"
28
+ "Short Description:","Краткое описание:"
29
+ "Documentation:","Документация:"
30
+ "Support:","Поддержка:"
31
+ "Advertisement:","Реклама:"
32
+ "You can see description of extension features and answers to the frequently asked questions on <a href=""%s"" target=""_balnk"">our website</a>.","Описание позможностей модуля и ответы на часто задаваемые вопросы смотрите на <a href=""%s"" target=""_balnk"">нашем сайте</a>."
33
+ "You can hire our team to customize the extension. E-mail us on sales@etwebsolutions.com.<br><br>You can see a list of provided services on <a href=""%s"" target=""_blank"">our website</a>.","Вы можете нанять нашу команду для любых работ по модификации модуля. Пишите на адрес sales@etwebsolutions.com.<br><br>Со списком предоставляемых нами услуг вы можете ознакомиться <a href=""%s"" target=""_blank"">на нашем сайте</a>."
34
+ "Extension support is available through <a href=""%s"" target=""_blank"">issue tracking system</a>.<br>You can see information freely, but you will have to sign up to open a ticket.<br><br>Please, report all bugs and feature requests that are connected to this extension.<br><br>If by some reason you can not submit a question, bug report or feature request to our ticket system, you can write us an email - support@etwebsolutions.com.","Поддержка модуля осуществляется через <a href=""%s"" target=""_blank"">систему отслеживания заданий</a>.<br>Для создания задачи будет необходимо зарегистрироваться. Для просмотра информации регистрация не требуется.<br><br>Пожалуйста, сообщайте нам о найденных ошибках и о своих пожеланиях в рамках этого модуля.<br><br>Если по каким-либо причинам вы не можете размеситить вопрос/сообщение об ошибке/пожелание в списке задач, то можете написать нам по адресу support@etwebsolutions.com."
package.xml CHANGED
@@ -1,22 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ET_AdvancedCompare</name>
4
- <version>0.5.0</version>
5
  <stability>stable</stability>
6
- <license uri="http://opensource.org/licenses/afl-3.0.php">AFL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>This extension adds some freedom in product comparison management feature.</summary>
10
- <description>1. Extension allows to disable comparation on your shop (everywhere or on specified store view)
11
- 2. Extension adds attribute remove_compare_link. Depending on its value (Yes/No) the link for adding product to compare is shown or not shown (for example, if you want to forbid adding to compare for products with small attribute amounts - books, video games, etc.)
12
- 3. Extension increases shop performance by allowing customers to work with list of products for comparison without reloading page (add/remove product to list, clear list).
13
- 4. Extension contains advanced template for product comparison page. By default it doesn't display attributes, which values are the same for every product on the page. Customer can switch this feature off and on without reloading the page.
14
- 5. Extension adds sorting by attribute to product compare window (as in attribute set edit form in admin panel).</description>
15
  <notes>stable release</notes>
16
- <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>
17
- <date>2011-04-27</date>
18
- <time>20:41:37</time>
19
- <contents><target name="magelocale"><dir name="en_US"><file name="ET_AdvancedCompare.csv" hash="d8ceead0f69e65a160b62c44d79f7b5a"/></dir><dir name="lv_LV"><file name="ET_AdvancedCompare.csv" hash="ad6bd23540ed502e590ffcae331296c6"/></dir><dir name="ru_RU"><file name="ET_AdvancedCompare.csv" hash="d55d6404886ef889d6fe150ef116cee6"/></dir></target><target name="magecommunity"><dir name="ET"><dir name="AdvancedCompare"><dir name="Block"><file name="List.php" hash="37ea3ff13c17c21b9af9d88f88ac9399"/></dir><dir name="controllers"><file name="IndexController.php" hash="0ac917b6a71a76e7e051a383e13b9a6a"/></dir><dir name="etc"><file name="config.xml" hash="5842bc305a855f2f8ffec0ef155320d4"/><file name="system.xml" hash="59ccd30dcf22322fc91b3a1f7ea9b941"/></dir><dir name="Helper"><file name="Data.php" hash="afa1b38a67cd187c44bdfcbe5e3536cf"/></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="39a146c86ea05e251af463276452a392"/></dir></dir></dir></dir></dir></dir></dir><dir name="sql"><dir name="advancedcompare_setup"><file name="mysql4-install-0.1.php" hash="94e38151b4da2cb96ae168e778aa71cf"/></dir></dir></dir><file name="ET_AdvancedCompare_ChangeLog.txt" hash="d3e0b1d8767b25ce24d72d1ad6ebdd40"/><file name="ET_AdvancedCompare_Description.txt" hash="b7bc2dd38960ec5e39f130c931867cb8"/><file name="ET_AdvancedCompare_LICENSE.txt" hash="b799504264c23c11a941473d7a3e3ab7"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="noreload.css" hash="31cfd073e4404ab1c325abe9de1928af"/></dir><dir name="js"><file name="noreload.js" hash="1e7a2aa3f7dea33f4a6f412565839266"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="et_advancedcompare.xml" hash="f00891d2b2b927e9eb18e46c84a92b11"/></dir><dir name="template"><dir name="et_advancedcompare"><file name="list_13x.phtml" hash="6bd2f354e79812359db38ca124bc90d7"/><file name="list_15x.phtml" hash="cf3f719878c4e79f90c013040fb052b5"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="ET_AdvancedCompare.xml" hash="37ca83e0b75f274fa0300dadf934bc97"/></dir></target></contents>
20
  <compatible/>
21
- <dependencies/>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ET_AdvancedCompare</name>
4
+ <version>1.0.1</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>
8
  <extends/>
9
+ <summary>Extension allows to add products to compare without page reloading (AJAX), improves visualization of results and allows to switch compare off on your website.</summary>
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>niro</user><email>support@etwebsolutions.com</email></author><author><name>Andrej</name><user>zlojd</user><email>support@etwebsolutions.com</email></author></authors>
13
+ <date>2012-12-12</date>
14
+ <time>15:03:27</time>
15
+ <contents><target name="magecommunity"><dir name="ET"><dir name="AdvancedCompare"><dir name="Block"><dir name="Adminhtml"><file name="Support.php" hash="19898b364b14f10c899549debcd1391b"/></dir><file name="List.php" hash="b8fa439a62955f0d5ac65246f43000ab"/></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="a07bb259061656955333fb2dce763d0f"/></dir></dir></dir></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="edd8d80a790ea9415e4de155b25e0501"/></dir><dir name="etc"><file name="config.xml" hash="b70c21d18c757bbff6d94259ad5013ba"/><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="96ad3a0ee1c0f2d87ba970ddb6b92fb4"/></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_13x.phtml" hash="045859ed681f3854c4c13be3e26cf275"/><file name="list_15x.phtml" hash="f5b0c350a28f87e90543c2978580abcc"/></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="fce9dbe16eb0d5e412d7a78165ec8024"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
+ <dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
skin/frontend/base/default/css/et_advancedcompare/noreload.css ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ #animated_div {
2
+ border: #ADADAD 1px double;
3
+ background: #E9E9E9;
4
+ }
skin/frontend/base/default/js/et_advancedcompare/noreload.js ADDED
@@ -0,0 +1,250 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //**
2
+ // * NOTICE OF LICENSE
3
+ // *
4
+ // * You may not sell, sub-license, rent or lease
5
+ // * any portion of the Software or Documentation to anyone.
6
+ // *
7
+ // * DISCLAIMER
8
+ // *
9
+ // * Do not edit or add to this file if you wish to upgrade to newer
10
+ // * versions in the future.
11
+ // *
12
+ // * @category ET
13
+ // * @package ET_AdvancedCompare
14
+ // * @copyright Copyright (c) 2012 ET Web Solutions (http://etwebsolutions.com)
15
+ // * @contacts support@etwebsolutions.com
16
+ // * @license http://shop.etwebsolutions.com/etws-license-free-v1/ ETWS Free License (EFL1)
17
+ // */
18
+
19
+ var CompareNoReload = {
20
+
21
+ compareAnimationCount: 0,
22
+
23
+ compareRemoveFromListSilent: function(removeUrl)
24
+ {
25
+ new Ajax.Request(removeUrl, {
26
+ onSuccess: function(response) {
27
+ CompareNoReload.compareUpdateSidebarHtml(response.responseText);
28
+ CompareNoReload.rescanForNewCompare();
29
+ }
30
+ });
31
+ },
32
+
33
+ compareClearList: function (clearUrl,textAlert)
34
+ {
35
+ new Ajax.Request(clearUrl, {
36
+ onSuccess: function(response) {
37
+ CompareNoReload.compareUpdateSidebarHtml(response.responseText);
38
+ CompareNoReload.rescanForNewCompare();
39
+ }
40
+ });
41
+ },
42
+
43
+
44
+ compareAddToList: function (addUrl,id2Animate)
45
+ {
46
+ this.startAnimation(id2Animate);
47
+ new Ajax.Request(addUrl, {
48
+ onSuccess: function(response) {
49
+ CompareNoReload.compareUpdateSidebarHtml(response.responseText);
50
+ CompareNoReload.rescanForNewCompare();
51
+ }
52
+ });
53
+ return false;
54
+ },
55
+
56
+ /*
57
+ compareUpdateSidebar: function ()
58
+ {
59
+ if(typeof($("compareUpdateUrl")) !== 'undefined')
60
+ new Ajax.Request($("compareUpdateUrl").value, {
61
+ method: 'post',
62
+ parameters: $('shipping-type').serialize(true),
63
+ onSuccess: function(response) {
64
+ this.getCompareSideBlock().update(response.responseText);
65
+ this.rescanForNewCompare();
66
+ }
67
+ });
68
+ },
69
+ */
70
+
71
+ compareUpdateSidebarHtml: function (updateText)
72
+ {
73
+ if(typeof(this.getCompareSideBlock()) != 'undefined'){
74
+ //compareAnimationText=eval(updateText);
75
+ this.getCompareSideBlock().replace(eval(updateText));
76
+ }
77
+ },
78
+
79
+
80
+ startAnimation: function (id2Animate)
81
+ {
82
+ if(typeof(id2Animate)!= 'undefined') {
83
+ if((typeof(this.getCompareSideBlock()) != 'undefined')&($(id2Animate) != null)) {
84
+
85
+ var xy=this.getCompareSideBlock().cumulativeOffset();
86
+ var dmnsns = this.getCompareSideBlock().getDimensions();
87
+ var endPosition={
88
+ top :xy[1]+dmnsns.height-5-22,
89
+ left :xy[0]+dmnsns.width-5-79,
90
+ width :79,
91
+ height :22
92
+ };
93
+ var animatedSteps=10;
94
+ var animatedTime=0.75;
95
+ var xy=$(id2Animate).cumulativeOffset();
96
+ var dmnsns = $(id2Animate).getDimensions();
97
+
98
+ var startPosition={
99
+ top :xy[1],
100
+ left :xy[0],
101
+ width :dmnsns.width,
102
+ height :dmnsns.height
103
+ };
104
+
105
+ var accelerationX=(endPosition.left-startPosition.left)*2/animatedSteps/animatedSteps;
106
+ var accelerationY=(endPosition.top-startPosition.top)*2/animatedSteps/animatedSteps;
107
+
108
+ if($('animated_div')==null)
109
+ {
110
+ $$('div.wrapper')[0].insert({bottom:'<div id="animated_div"></div>'});
111
+ }
112
+
113
+ $('animated_div').setStyle({
114
+ "position" :"absolute",
115
+ "left" :startPosition.left+"px",
116
+ "top" :startPosition.top+'px',
117
+ "width" :startPosition.width+'px',
118
+ "height" :startPosition.height+'px',
119
+ "display" :""
120
+ });
121
+ $('animated_div').setOpacity(0.7);
122
+
123
+ for(var i=0;i<animatedSteps;i++)
124
+ {
125
+
126
+ Element.setStyle.delay(animatedTime/animatedSteps*i, "animated_div",
127
+ {
128
+ "top" :(startPosition.top+parseInt(accelerationY*i*i/2))+"px",
129
+ "left" :(startPosition.left+parseInt(accelerationX*i*i/2))+"px",
130
+ "width" :(startPosition.width-parseInt((startPosition.width-endPosition.width)/animatedSteps*i))+"px",
131
+ "height" :(startPosition.height-parseInt((startPosition.height-endPosition.height)/animatedSteps*i))+"px"
132
+ });
133
+
134
+ }
135
+
136
+ Element.setStyle.delay(animatedTime/animatedSteps*(animatedSteps+1), "animated_div",
137
+ {
138
+ "display" :"none"
139
+ });
140
+
141
+
142
+ }
143
+ }
144
+ },
145
+
146
+ compareAnimationMove: function()
147
+ {
148
+ new PeriodicalExecuter(function(pe) {
149
+ this.compareAnimationCount++;
150
+ }, 0.2);
151
+
152
+ },
153
+
154
+
155
+ rescanForNewCompare: function()
156
+ {
157
+ var allOldLinks=$$("a[href*=product_compare/add/product]");
158
+ for (var i=0;i<allOldLinks.length;i++) {
159
+ if(allOldLinks[i].readAttribute("oldlink")==null)
160
+ {
161
+ var tmpHref=allOldLinks[i].href;
162
+ allOldLinks[i].href="#";
163
+ allOldLinks[i].writeAttribute("oldlink",tmpHref);
164
+ var fparent=this.findParentByCss(allOldLinks[i],"li.item");
165
+ if (fparent==null) {
166
+ fparent=this.findParentByCss(allOldLinks[i],"li");
167
+ }
168
+ if (fparent.id=="") {
169
+ fparent.id="divforcomparing"+i;
170
+ }
171
+
172
+ var myString = new String(tmpHref)
173
+ rExp = /\/add\//gi;
174
+ tmpHref = myString.replace(rExp, "/silentadd/");
175
+
176
+ allOldLinks[i]['onclick']=new Function("return CompareNoReload.compareAddToList('"+tmpHref+"','"+fparent.id+"')");
177
+ }
178
+ }
179
+
180
+ var allOldLinks=$$("a[href*=product_compare/clear]");
181
+ for (var i=0;i<allOldLinks.length;i++) {
182
+ if(allOldLinks[i].readAttribute("oldlink")==null)
183
+ {
184
+ var tmpHref=allOldLinks[i].href;
185
+ allOldLinks[i].writeAttribute("oldlink",tmpHref);
186
+
187
+ var myString = new String(tmpHref)
188
+ rExp = /\/clear\//gi;
189
+ tmpHref = myString.replace(rExp, "/silentclear/");
190
+
191
+ allOldLinks[i].href="javascript:CompareNoReload.compareClearList('"+tmpHref+"')";
192
+ }
193
+ }
194
+
195
+ var allOldLinks=$$("a[href*=product_compare/remove]");
196
+ for(var i=0;i<allOldLinks.length;i++) {
197
+ if(allOldLinks[i].readAttribute("oldlink")==null)
198
+ {
199
+ var tmpHref=allOldLinks[i].href;
200
+ allOldLinks[i].writeAttribute("oldlink",tmpHref);
201
+
202
+ var myString = new String(tmpHref)
203
+ rExp = /\/remove\//gi;
204
+ tmpHref = myString.replace(rExp, "/silentremove/");
205
+
206
+ allOldLinks[i].href="javascript:CompareNoReload.compareRemoveFromListSilent('"+tmpHref+"')";
207
+ }
208
+ }
209
+ },
210
+
211
+
212
+ findParentByCss: function(element,rule)
213
+ {
214
+ var el2ret=element.parentNode;
215
+ if (el2ret.tagName=="body") {
216
+ return null;
217
+ }
218
+ if (el2ret.tagName=="BODY") {
219
+ return null;
220
+ }
221
+ if ($(el2ret).match(rule)) {
222
+ return el2ret;
223
+ } else {
224
+ return this.findParentByCss(element.parentNode,rule);
225
+ }
226
+ },
227
+
228
+ getCompareSideBlock: function ()
229
+ { //1.3.x.x
230
+ if ($$("div.mini-compare-products").length>0) {
231
+ return $$("div.mini-compare-products")[0];
232
+ }
233
+ //1.4+
234
+ return $$("div.block-compare")[0];
235
+ }
236
+ }
237
+
238
+
239
+
240
+ Event.observe(window, 'load', function()
241
+ {
242
+
243
+ //redefining click
244
+ CompareNoReload.rescanForNewCompare();
245
+
246
+ if(CompareNoReload.getCompareSideBlock() == null) {
247
+ if($$('div.col-left').length>0)$$('div.col-left')[0].insert({bottom:'<div class="block-compare"></div>'});
248
+ else if($$('div.col-right').length>0)$$('div.col-right')[0].insert({bottom:'<div class="block-compare"></div>'});
249
+ }
250
+ });
skin/frontend/default/default/css/noreload.css DELETED
@@ -1,4 +0,0 @@
1
- #animated_div {
2
- border: #ADADAD 1px double;
3
- background: #E9E9E9;
4
- }
 
 
 
 
skin/frontend/default/default/js/noreload.js DELETED
@@ -1,244 +0,0 @@
1
- //**
2
- // * ET Web Solutions
3
- // *
4
- // * NOTICE OF LICENSE
5
- // *
6
- // * This source file is subject to the Academic Free License (AFL 3.0)
7
- // *
8
- // * DISCLAIMER
9
- // *
10
- // * Do not edit or add to this file if you wish to upgrade to newer
11
- // * versions in the future.
12
- // *
13
- // * @category ET
14
- // * @package ET_AdvancedCompare
15
- // * @copyright Copyright (c) 2011 ET Web Solutions (http://etwebsolutions.com)
16
- // * @contacts support@etwebsolutions.com
17
- // * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
18
- // */
19
-
20
-
21
- var CompareNoReload = {
22
-
23
- compareAnimationCount: 0,
24
-
25
-
26
- compareRemoveFromListSilent: function(removeUrl)
27
- {
28
- new Ajax.Request(removeUrl, {
29
- onSuccess: function(response) {
30
- CompareNoReload.compareUpdateSidebarHtml(response.responseText);
31
- CompareNoReload.rescanForNewCompare();
32
- }
33
- });
34
- },
35
-
36
-
37
- compareClearList: function (clearUrl,textAlert)
38
- {
39
- new Ajax.Request(clearUrl, {
40
- onSuccess: function(response) {
41
- CompareNoReload.compareUpdateSidebarHtml(response.responseText);
42
- CompareNoReload.rescanForNewCompare();
43
- }
44
- });
45
- },
46
-
47
-
48
- compareAddToList: function (addUrl,id2Animate)
49
- {
50
- this.startAnimation(id2Animate);
51
- new Ajax.Request(addUrl, {
52
- onSuccess: function(response) {
53
- CompareNoReload.compareUpdateSidebarHtml(response.responseText);
54
- CompareNoReload.rescanForNewCompare();
55
- }
56
- });
57
- return false;
58
- },
59
-
60
- /*
61
- compareUpdateSidebar: function ()
62
- {
63
- if(typeof($("compareUpdateUrl")) !== 'undefined')
64
- new Ajax.Request($("compareUpdateUrl").value, {
65
- method: 'post',
66
- parameters: $('shipping-type').serialize(true),
67
- onSuccess: function(response) {
68
- this.getCompareSideBlock().update(response.responseText);
69
- this.rescanForNewCompare();
70
- }
71
- });
72
- },
73
- */
74
-
75
- compareUpdateSidebarHtml: function (updateText)
76
- {
77
- if(typeof(this.getCompareSideBlock()) != 'undefined'){
78
- //compareAnimationText=eval(updateText);
79
- this.getCompareSideBlock().replace(eval(updateText));
80
- }
81
- },
82
-
83
-
84
- startAnimation: function (id2Animate)
85
- {
86
-
87
- if(typeof(id2Animate)!= 'undefined')if((typeof(this.getCompareSideBlock()) != 'undefined')&($(id2Animate) != null))
88
- {
89
-
90
- var xy=this.getCompareSideBlock().cumulativeOffset();
91
- var dmnsns = this.getCompareSideBlock().getDimensions();
92
- var endPosition={
93
- top :xy[1]+dmnsns.height-5-22,
94
- left :xy[0]+dmnsns.width-5-79,
95
- width :79,
96
- height :22
97
- };
98
- var animatedSteps=10;
99
- var animatedTime=0.75;
100
- var xy=$(id2Animate).cumulativeOffset();
101
- var dmnsns = $(id2Animate).getDimensions();
102
-
103
- var startPosition={
104
- top :xy[1],
105
- left :xy[0],
106
- width :dmnsns.width,
107
- height :dmnsns.height
108
- };
109
-
110
- var accelerationX=(endPosition.left-startPosition.left)*2/animatedSteps/animatedSteps;
111
- var accelerationY=(endPosition.top-startPosition.top)*2/animatedSteps/animatedSteps;
112
-
113
- if($('animated_div')==null)
114
- {
115
- $$('div.wrapper')[0].insert({bottom:'<div id="animated_div"></div>'});
116
- }
117
-
118
- $('animated_div').setStyle({
119
- "position" :"absolute",
120
- "left" :startPosition.left+"px",
121
- "top" :startPosition.top+'px',
122
- "width" :startPosition.width+'px',
123
- "height" :startPosition.height+'px',
124
- "display" :""
125
- });
126
- $('animated_div').setOpacity(0.7);
127
-
128
- for(var i=0;i<animatedSteps;i++)
129
- {
130
-
131
- Element.setStyle.delay(animatedTime/animatedSteps*i, "animated_div",
132
- {
133
- "top" :(startPosition.top+parseInt(accelerationY*i*i/2))+"px",
134
- "left" :(startPosition.left+parseInt(accelerationX*i*i/2))+"px",
135
- "width" :(startPosition.width-parseInt((startPosition.width-endPosition.width)/animatedSteps*i))+"px",
136
- "height" :(startPosition.height-parseInt((startPosition.height-endPosition.height)/animatedSteps*i))+"px"
137
- });
138
-
139
- }
140
-
141
- Element.setStyle.delay(animatedTime/animatedSteps*(animatedSteps+1), "animated_div",
142
- {
143
- "display" :"none"
144
- });
145
-
146
-
147
- }
148
-
149
- },
150
-
151
- compareAnimationMove: function()
152
- {
153
- new PeriodicalExecuter(function(pe) {
154
- this.compareAnimationCount++;
155
- }, 0.2);
156
-
157
- },
158
-
159
-
160
- rescanForNewCompare: function()
161
- {
162
- var allOldLinks=$$("a[href*=product_compare/add/product]");
163
- for(var i=0;i<allOldLinks.length;i++)
164
- if(allOldLinks[i].readAttribute("oldlink")==null)
165
- {
166
- var tmpHref=allOldLinks[i].href;
167
- allOldLinks[i].href="#";
168
- allOldLinks[i].writeAttribute("oldlink",tmpHref);
169
- var fparent=this.findParentByCss(allOldLinks[i],"li.item");
170
- if(fparent==null)fparent=this.findParentByCss(allOldLinks[i],"li");
171
- if(fparent.id=="")
172
- {
173
- fparent.id="divforcomparing"+i;
174
- }
175
-
176
- var myString = new String(tmpHref)
177
- rExp = /\/add\//gi;
178
- tmpHref = myString.replace(rExp, "/silentadd/");
179
-
180
- allOldLinks[i]['onclick']=new Function("return CompareNoReload.compareAddToList('"+tmpHref+"','"+fparent.id+"')");
181
- }
182
-
183
-
184
- var allOldLinks=$$("a[href*=product_compare/clear]");
185
- for(var i=0;i<allOldLinks.length;i++)
186
- if(allOldLinks[i].readAttribute("oldlink")==null)
187
- {
188
- var tmpHref=allOldLinks[i].href;
189
- allOldLinks[i].writeAttribute("oldlink",tmpHref);
190
-
191
- var myString = new String(tmpHref)
192
- rExp = /\/clear\//gi;
193
- tmpHref = myString.replace(rExp, "/silentclear/");
194
-
195
- allOldLinks[i].href="javascript:CompareNoReload.compareClearList('"+tmpHref+"')";
196
- }
197
-
198
- var allOldLinks=$$("a[href*=product_compare/remove]");
199
- for(var i=0;i<allOldLinks.length;i++)
200
- if(allOldLinks[i].readAttribute("oldlink")==null)
201
- {
202
- var tmpHref=allOldLinks[i].href;
203
- allOldLinks[i].writeAttribute("oldlink",tmpHref);
204
-
205
- var myString = new String(tmpHref)
206
- rExp = /\/remove\//gi;
207
- tmpHref = myString.replace(rExp, "/silentremove/");
208
-
209
- allOldLinks[i].href="javascript:CompareNoReload.compareRemoveFromListSilent('"+tmpHref+"')";
210
- }
211
- },
212
-
213
-
214
- findParentByCss: function(element,rule)
215
- {
216
- var el2ret=element.parentNode;
217
- if(el2ret.tagName=="body")return null;
218
- if(el2ret.tagName=="BODY")return null;
219
- if($(el2ret).match(rule)) return el2ret;
220
- else return this.findParentByCss(element.parentNode,rule);
221
- },
222
-
223
- getCompareSideBlock: function ()
224
- { //1.3.x.x
225
- if($$("div.mini-compare-products").length>0)return $$("div.mini-compare-products")[0];
226
- //1.4+
227
- return $$("div.block-compare")[0];
228
- }
229
- }
230
-
231
-
232
-
233
- Event.observe(window, 'load', function()
234
- {
235
-
236
- //redefining click
237
- CompareNoReload.rescanForNewCompare();
238
-
239
- if(CompareNoReload.getCompareSideBlock() == null)
240
- {
241
- if($$('div.col-left').length>0)$$('div.col-left')[0].insert({bottom:'<div class="block-compare"></div>'});
242
- else if($$('div.col-right').length>0)$$('div.col-right')[0].insert({bottom:'<div class="block-compare"></div>'});
243
- }
244
- });