Magehouse_Slider - Version 2.1.0

Version Notes

First Release

Features:

- Customization of slider theme from backend.
- Can use both Images and background color for the slider.
- Can specify whether to include the jQuery or not.

Relase Notes 1.0.2

- Fixed bug : jQuery & jQuery UI not getting included.

Relase Notes 1.0.3

- Fixed bug : Do not Use Images has no effect on frontend.

Relase Notes 1.0.4

- Added : Special Price in filtering

Relase Notes 1.0.5

Bugs Solved :
- Currency symbol do not change - Solved

Improvements:
- Removed theme file dependency

Relase Notes 2.0.0

Bugs Solved :
- Catalog search not working - Solved

Improvements:
- Price Slider now available on search page also

Relase Notes 2.1.0

Improvements:
- AJAX price slider on both category and search pages
- AJAX layered navigation can also be enabled
- AJAX Toolbar can also be enabled

Download this release

Release Info

Developer Mrugesh Mistry
Extension Magehouse_Slider
Version 2.1.0
Comparing to
See all releases


Code changes from version 2.0.0 to 2.1.0

app/code/community/Magehouse/Slider/Block/Catalog/Layer/Filter/Price.php CHANGED
@@ -80,6 +80,10 @@ class Magehouse_Slider_Block_Catalog_Layer_Filter_Price extends Mage_Catalog_Blo
80
  $styles = $this->prepareCustomStyles();
81
  if($this->_currMaxPrice > 0){$max = $this->_currMaxPrice;} else{$max = $this->_maxPrice;}
82
  if($this->_currMinPrice > 0){$min = $this->_currMinPrice;} else{$min = $this->_minPrice;}
 
 
 
 
83
  $html = '
84
  <script type="text/javascript">
85
  jQuery(function($) {
@@ -97,10 +101,12 @@ class Magehouse_Slider_Block_Catalog_Layer_Filter_Price extends Mage_Catalog_Blo
97
  var url = "'.$baseUrl.'"+"?min="+x1+"&max="+x2+"'.$this->prepareParams().'";
98
  if(x1 != '.$min.' && x2 != '.$max.'){
99
  clearTimeout(timer);
100
- window.location= url;
 
101
  }else{
102
  timer = setTimeout(function(){
103
- window.location= url;
 
104
  }, '.$timeout.');
105
  }
106
  }
80
  $styles = $this->prepareCustomStyles();
81
  if($this->_currMaxPrice > 0){$max = $this->_currMaxPrice;} else{$max = $this->_maxPrice;}
82
  if($this->_currMinPrice > 0){$min = $this->_currMinPrice;} else{$min = $this->_minPrice;}
83
+ $sliderAjax = $this->getConfig('price_slider/ajax_conf/slider');
84
+ if($sliderAjax){
85
+ $ajaxCall = 'sliderAjax(url);';
86
+ }else{$ajaxCall = '';}
87
  $html = '
88
  <script type="text/javascript">
89
  jQuery(function($) {
101
  var url = "'.$baseUrl.'"+"?min="+x1+"&max="+x2+"'.$this->prepareParams().'";
102
  if(x1 != '.$min.' && x2 != '.$max.'){
103
  clearTimeout(timer);
104
+ //window.location= url;
105
+
106
  }else{
107
  timer = setTimeout(function(){
108
+ //window.location= url;
109
+ '.$ajaxCall.'
110
  }, '.$timeout.');
111
  }
112
  }
app/code/community/Magehouse/Slider/Block/Catalog/Layer/Filter/Price/Slider.php DELETED
@@ -1,6 +0,0 @@
1
- <?php
2
-
3
- class Magehouse_Slider_Block_Catalog_Layer_Filter_Price_slider extends Mage_Catalog_Block_Layer_Filter_Abstract
4
- {
5
-
6
- }
 
 
 
 
 
 
app/code/community/Magehouse/Slider/Model/Resource/Setup.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magehouse_Slider_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup {
4
+
5
+ }
app/code/community/Magehouse/Slider/controllers/Catalog/CategoryController.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Category controller
4
+ *
5
+ * @category Mage
6
+ * @package Mage_Catalog
7
+ * @author Magento Core Team <core@magentocommerce.com>
8
+ */
9
+
10
+ require_once('app/code/core/Mage/Catalog/controllers/CategoryController.php');
11
+ class Magehouse_Slider_Catalog_CategoryController extends Mage_Catalog_CategoryController
12
+ {
13
+
14
+ public function viewAction()
15
+ {
16
+ if($this->getRequest()->isXmlHttpRequest()){ //Check if it was an AJAX request
17
+ $response = array();
18
+
19
+ if ($category = $this->_initCatagory()) {
20
+ $design = Mage::getSingleton('catalog/design');
21
+ $settings = $design->getDesignSettings($category);
22
+
23
+ // apply custom design
24
+ if ($settings->getCustomDesign()) {
25
+ $design->applyCustomDesign($settings->getCustomDesign());
26
+ }
27
+
28
+ Mage::getSingleton('catalog/session')->setLastViewedCategoryId($category->getId());
29
+
30
+ $update = $this->getLayout()->getUpdate();
31
+ $update->addHandle('default');
32
+
33
+ if (!$category->hasChildren()) {
34
+ $update->addHandle('catalog_category_layered_nochildren');
35
+ }
36
+
37
+ $this->addActionLayoutHandles();
38
+ $update->addHandle($category->getLayoutUpdateHandle());
39
+ $update->addHandle('CATEGORY_' . $category->getId());
40
+ $this->loadLayoutUpdates();
41
+
42
+ // apply custom layout update once layout is loaded
43
+ if ($layoutUpdates = $settings->getLayoutUpdates()) {
44
+ if (is_array($layoutUpdates)) {
45
+ foreach($layoutUpdates as $layoutUpdate) {
46
+ $update->addUpdate($layoutUpdate);
47
+ }
48
+ }
49
+ }
50
+
51
+ $this->generateLayoutXml()->generateLayoutBlocks(); //Generate new blocks
52
+ $viewpanel = $this->getLayout()->getBlock('catalog.leftnav')->toHtml(); // Generate New Layered Navigation Menu
53
+ $productlist = $this->getLayout()->getBlock('product_list')->toHtml(); // Generate product list
54
+ $response['status'] = 'SUCCESS';
55
+ $response['viewpanel']=$viewpanel;
56
+ $response['productlist'] = $productlist;
57
+
58
+ // apply custom layout (page) template once the blocks are generated
59
+ }elseif (!$this->getResponse()->isRedirect()) {
60
+ $this->_forward('noRoute');
61
+ $response['status'] = 'FAILURE';
62
+ }
63
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));
64
+ return;
65
+ }
66
+
67
+ if ($category = $this->_initCatagory()) {
68
+ $design = Mage::getSingleton('catalog/design');
69
+ $settings = $design->getDesignSettings($category);
70
+
71
+ // apply custom design
72
+ if ($settings->getCustomDesign()) {
73
+ $design->applyCustomDesign($settings->getCustomDesign());
74
+ }
75
+
76
+ Mage::getSingleton('catalog/session')->setLastViewedCategoryId($category->getId());
77
+
78
+ $update = $this->getLayout()->getUpdate();
79
+ $update->addHandle('default');
80
+
81
+ if (!$category->hasChildren()) {
82
+ $update->addHandle('catalog_category_layered_nochildren');
83
+ }
84
+
85
+ $this->addActionLayoutHandles();
86
+ $update->addHandle($category->getLayoutUpdateHandle());
87
+ $update->addHandle('CATEGORY_' . $category->getId());
88
+ $this->loadLayoutUpdates();
89
+
90
+ // apply custom layout update once layout is loaded
91
+ if ($layoutUpdates = $settings->getLayoutUpdates()) {
92
+ if (is_array($layoutUpdates)) {
93
+ foreach($layoutUpdates as $layoutUpdate) {
94
+ $update->addUpdate($layoutUpdate);
95
+ }
96
+ }
97
+ }
98
+
99
+ $this->generateLayoutXml()->generateLayoutBlocks();
100
+ // apply custom layout (page) template once the blocks are generated
101
+ if ($settings->getPageLayout()) {
102
+ $this->getLayout()->helper('page/layout')->applyTemplate($settings->getPageLayout());
103
+ }
104
+
105
+ if ($root = $this->getLayout()->getBlock('root')) {
106
+ $root->addBodyClass('categorypath-' . $category->getUrlPath())
107
+ ->addBodyClass('category-' . $category->getUrlKey());
108
+ }
109
+
110
+ $this->_initLayoutMessages('catalog/session');
111
+ $this->_initLayoutMessages('checkout/session');
112
+ $this->renderLayout();
113
+ }elseif (!$this->getResponse()->isRedirect()) {
114
+ $this->_forward('noRoute');
115
+ }
116
+ }
117
+
118
+ }
app/code/community/Magehouse/Slider/controllers/CatalogSearch/ResultController.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Catalog Search Controller
4
+ */
5
+ require_once('app/code/core/Mage/CatalogSearch/controllers/ResultController.php');
6
+ class Magehouse_Slider_CatalogSearch_ResultController extends Mage_CatalogSearch_ResultController
7
+ {
8
+
9
+ public function indexAction()
10
+ {
11
+
12
+ if($this->getRequest()->isXmlHttpRequest()){
13
+ //Check for AJAX query
14
+ $response = array();
15
+
16
+ $query = Mage::helper('catalogsearch')->getQuery();
17
+ /* @var $query Mage_CatalogSearch_Model_Query */
18
+
19
+ $query->setStoreId(Mage::app()->getStore()->getId());
20
+
21
+ if ($query->getQueryText()) {
22
+ if (Mage::helper('catalogsearch')->isMinQueryLength()) {
23
+ $query->setId(0)
24
+ ->setIsActive(1)
25
+ ->setIsProcessed(1);
26
+ }
27
+ else {
28
+ if ($query->getId()) {
29
+ $query->setPopularity($query->getPopularity()+1);
30
+ }else {
31
+ $query->setPopularity(1);
32
+ }
33
+
34
+ if ($query->getRedirect()){
35
+ $query->save();
36
+ $this->getResponse()->setRedirect($query->getRedirect());
37
+ return;
38
+ }else {
39
+ $query->prepare();
40
+ }
41
+ }
42
+
43
+ Mage::helper('catalogsearch')->checkNotes();
44
+
45
+ $this->loadLayout();
46
+ $this->_initLayoutMessages('catalog/session');
47
+ $this->_initLayoutMessages('checkout/session');
48
+ $this->renderLayout();
49
+
50
+ if (!Mage::helper('catalogsearch')->isMinQueryLength()) {
51
+ $query->save();
52
+ }
53
+ }
54
+ else {
55
+ $this->_redirectReferer();
56
+ $response['status'] = 'FAILURE'; //Add failure when filter can't be applied
57
+ }
58
+
59
+ $viewpanel = $this->getLayout()->getBlock('catalogsearch.leftnav')->toHtml(); //Get the new Layered Manu
60
+ $productlist = $this->getLayout()->getBlock('search_result_list')->toHtml(); //New product List
61
+ $response['status'] = 'SUCCESS'; //Send Success
62
+ $response['viewpanel']=$viewpanel;
63
+ $response['productlist'] = $productlist;
64
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));
65
+ return;
66
+
67
+ }
68
+ $query = Mage::helper('catalogsearch')->getQuery();
69
+ /* @var $query Mage_CatalogSearch_Model_Query */
70
+
71
+ $query->setStoreId(Mage::app()->getStore()->getId());
72
+
73
+ if ($query->getQueryText()) {
74
+ if (Mage::helper('catalogsearch')->isMinQueryLength()) {
75
+ $query->setId(0)
76
+ ->setIsActive(1)
77
+ ->setIsProcessed(1);
78
+ }else {
79
+ if ($query->getId()) {
80
+ $query->setPopularity($query->getPopularity()+1);
81
+ }else {
82
+ $query->setPopularity(1);
83
+ }
84
+
85
+ if ($query->getRedirect()){
86
+ $query->save();
87
+ $this->getResponse()->setRedirect($query->getRedirect());
88
+ return;
89
+ }else {
90
+ $query->prepare();
91
+ }
92
+ }
93
+
94
+ Mage::helper('catalogsearch')->checkNotes();
95
+
96
+ $this->loadLayout();
97
+ $this->_initLayoutMessages('catalog/session');
98
+ $this->_initLayoutMessages('checkout/session');
99
+ $this->renderLayout();
100
+
101
+ if (!Mage::helper('catalogsearch')->isMinQueryLength()) {
102
+ $query->save();
103
+ }
104
+ }
105
+ else {
106
+ $this->_redirectReferer();
107
+ }
108
+ }
109
+
110
+ }
app/code/community/Magehouse/Slider/etc/config.xml CHANGED
@@ -1,60 +1,108 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <Magehouse_Slider>
5
- <version>0.1.0</version>
6
- </Magehouse_Slider>
7
- </modules>
8
- <global>
9
- <helpers>
10
- <slider>
11
- <class>Magehouse_Slider_Helper</class>
12
- </slider>
13
- </helpers>
14
- <blocks>
15
- <catalog>
16
- <rewrite>
17
- <layer_filter_price>Magehouse_Slider_Block_Catalog_Layer_Filter_Price</layer_filter_price>
18
- </rewrite>
19
- </catalog>
20
- </blocks>
21
- <models>
22
- <catalog>
23
- <rewrite>
24
- <layer>Magehouse_Slider_Model_Catalog_Layer</layer>
25
- </rewrite>
26
- </catalog>
27
- <catalogsearch>
28
- <rewrite>
29
- <layer>Magehouse_Slider_Model_Catalogsearch_Layer</layer>
30
- </rewrite>
31
- </catalogsearch>
32
- </models>
33
- </global>
34
- <frontend>
35
- <layout>
36
- <updates>
37
- <slider>
38
- <file>slider.xml</file>
39
- </slider>
40
- </updates>
41
- </layout>
42
- </frontend>
43
- <default>
44
- <price_slider>
45
- <price_slider_settings></price_slider_settings>
46
- <price_slider_conf>
47
- <timeout>5000</timeout>
48
-
49
- <handle_color>#333333</handle_color>
50
- <background_color>#eeeeee</background_color>
51
- <range_color>#ffbb35</range_color>
52
- <handle_width>17</handle_width>
53
- <handle_height>18</handle_height>
54
- <slider_width>auto</slider_width>
55
- <slider_height>7</slider_height>
56
-
57
- </price_slider_conf>
58
- </price_slider>
59
- </default>
60
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Magehouse_Slider>
5
+ <version>2.1.0</version>
6
+ </Magehouse_Slider>
7
+ </modules>
8
+ <global>
9
+ <helpers>
10
+ <slider>
11
+ <class>Magehouse_Slider_Helper</class>
12
+ </slider>
13
+ </helpers>
14
+ <blocks>
15
+ <catalog>
16
+ <rewrite>
17
+ <layer_filter_price>Magehouse_Slider_Block_Catalog_Layer_Filter_Price</layer_filter_price>
18
+ </rewrite>
19
+ </catalog>
20
+ </blocks>
21
+ <models>
22
+ <catalog>
23
+ <rewrite>
24
+ <layer>Magehouse_Slider_Model_Catalog_Layer</layer>
25
+ </rewrite>
26
+ </catalog>
27
+ <catalogsearch>
28
+ <rewrite>
29
+ <layer>Magehouse_Slider_Model_Catalogsearch_Layer</layer>
30
+ </rewrite>
31
+ </catalogsearch>
32
+ </models>
33
+ <resources>
34
+ <slider_setup>
35
+ <setup>
36
+ <module>Magehouse_Slider</module>
37
+ <class>Magehouse_Slider_Model_Resource_Setup</class>
38
+ </setup>
39
+ <connection>
40
+ <use>core_setup</use>
41
+ </connection>
42
+ </slider_setup>
43
+
44
+ <slider_write>
45
+ <connection>
46
+ <use>core_write</use>
47
+ </connection>
48
+ </slider_write>
49
+ <slider_read>
50
+ <connection>
51
+ <use>core_read</use>
52
+ </connection>
53
+ </slider_read>
54
+ </resources>
55
+ </global>
56
+ <frontend>
57
+ <layout>
58
+ <updates>
59
+ <slider>
60
+ <file>slider.xml</file>
61
+ </slider>
62
+ </updates>
63
+ </layout>
64
+ <routers>
65
+ <slider>
66
+ <use>standard</use>
67
+ <args>
68
+ <module>Magehouse_Slider</module>
69
+ <frontName>slider</frontName>
70
+ </args>
71
+ </slider>
72
+ <catalog>
73
+ <args>
74
+ <modules>
75
+ <Magehouse_Slider before="Mage_Catalog">Magehouse_Slider_Catalog</Magehouse_Slider>
76
+ </modules>
77
+ </args>
78
+ </catalog>
79
+ <catalogsearch>
80
+ <args>
81
+ <modules>
82
+ <Magehouse_Slider before="Mage_CatalogSearch">Magehouse_Slider_CatalogSearch</Magehouse_Slider>
83
+ </modules>
84
+ </args>
85
+ </catalogsearch>
86
+ </routers>
87
+ </frontend>
88
+ <default>
89
+ <price_slider>
90
+ <price_slider_settings></price_slider_settings>
91
+ <price_slider_conf>
92
+ <handle_color>#333333</handle_color>
93
+ <background_color>#eeeeee</background_color>
94
+ <range_color>#ffbb35</range_color>
95
+ <handle_width>17</handle_width>
96
+ <handle_height>18</handle_height>
97
+ <slider_width>auto</slider_width>
98
+ <slider_height>7</slider_height>
99
+ </price_slider_conf>
100
+ <ajax_conf>
101
+ <overlay_color>#000000</overlay_color>
102
+ <overlay_opacity>0.7</overlay_opacity>
103
+ <loading_text>Fetching Results... Please wait...</loading_text>
104
+ <loading_text_color>#ffffff</loading_text_color>
105
+ </ajax_conf>
106
+ </price_slider>
107
+ </default>
108
+ </config>
app/code/community/Magehouse/Slider/etc/system.xml CHANGED
@@ -19,7 +19,7 @@
19
  <price_slider_settings translate="label">
20
  <label>Settings</label>
21
  <frontend_type>text</frontend_type>
22
- <sort_order>0</sort_order>
23
  <show_in_default>1</show_in_default>
24
  <show_in_website>1</show_in_website>
25
  <show_in_store>1</show_in_store>
@@ -59,7 +59,7 @@
59
  <price_slider_conf translate="label">
60
  <label>Price Slider Configuration</label>
61
  <frontend_type>text</frontend_type>
62
- <sort_order>1</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>
@@ -203,6 +203,97 @@
203
 
204
  </fields>
205
  </price_slider_conf>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  </groups>
207
  </price_slider>
208
  </sections>
19
  <price_slider_settings translate="label">
20
  <label>Settings</label>
21
  <frontend_type>text</frontend_type>
22
+ <sort_order>10</sort_order>
23
  <show_in_default>1</show_in_default>
24
  <show_in_website>1</show_in_website>
25
  <show_in_store>1</show_in_store>
59
  <price_slider_conf translate="label">
60
  <label>Price Slider Configuration</label>
61
  <frontend_type>text</frontend_type>
62
+ <sort_order>20</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>
203
 
204
  </fields>
205
  </price_slider_conf>
206
+ <ajax_conf translate="label">
207
+ <label>AJAX Configuration</label>
208
+ <frontend_type>text</frontend_type>
209
+ <sort_order>30</sort_order>
210
+ <show_in_default>1</show_in_default>
211
+ <show_in_website>1</show_in_website>
212
+ <show_in_store>1</show_in_store>
213
+ <fields>
214
+ <layered><!-- Make up a field key -->
215
+ <label>Enable AJAX for layered navigation?</label>
216
+ <frontend_type>select</frontend_type>
217
+ <source_model>adminhtml/system_config_source_yesno</source_model>
218
+ <sort_order>10</sort_order>
219
+ <show_in_default>1</show_in_default>
220
+ <show_in_website>1</show_in_website>
221
+ <show_in_store>1</show_in_store>
222
+ <comment>Set it to Yes for applying AJAX on layered navigation, NO will remove AJAX</comment>
223
+ </layered>
224
+ <slider><!-- Make up a field key -->
225
+ <label>Enable AJAX only for Price Slider?</label>
226
+ <frontend_type>select</frontend_type>
227
+ <source_model>adminhtml/system_config_source_yesno</source_model>
228
+ <sort_order>11</sort_order>
229
+ <show_in_default>1</show_in_default>
230
+ <show_in_website>1</show_in_website>
231
+ <show_in_store>1</show_in_store>
232
+ <comment>Set it to Yes for applying AJAX on layered navigation, NO will remove AJAX</comment>
233
+ </slider>
234
+ <toolbar><!-- Make up a field key -->
235
+ <label>Enable AJAX for product Toolbar?</label>
236
+ <frontend_type>select</frontend_type>
237
+ <source_model>adminhtml/system_config_source_yesno</source_model>
238
+ <sort_order>12</sort_order>
239
+ <show_in_default>1</show_in_default>
240
+ <show_in_website>1</show_in_website>
241
+ <show_in_store>1</show_in_store>
242
+ <comment>Set it to Yes for applying AJAX on entire toolbar , NO will remove AJAX</comment>
243
+ </toolbar>
244
+ <overlay_color><!-- Make up a field key -->
245
+ <label>Ajax Overlay color</label>
246
+ <frontend_type>text</frontend_type>
247
+ <sort_order>20</sort_order>
248
+ <show_in_default>1</show_in_default>
249
+ <show_in_website>1</show_in_website>
250
+ <show_in_store>1</show_in_store>
251
+ <comment>Color for the AJAX Overlay </comment>
252
+ </overlay_color>
253
+ <overlay_opacity><!-- Make up a field key -->
254
+ <label>Ajax Overlay opacity</label>
255
+ <frontend_type>text</frontend_type>
256
+ <sort_order>20</sort_order>
257
+ <show_in_default>1</show_in_default>
258
+ <show_in_website>1</show_in_website>
259
+ <show_in_store>1</show_in_store>
260
+ <comment>Opacity for the AJAX Overlay </comment>
261
+ </overlay_opacity>
262
+ <loading_image><!-- Make up a field key -->
263
+ <label>Loading Image</label>
264
+ <frontend_type>image</frontend_type>
265
+ <backend_model>adminhtml/system_config_backend_image</backend_model>
266
+ <upload_dir config="system/filesystem/media" scope_info="1">magehouse/slider</upload_dir>
267
+ <!-- would upload into media/uploaddir -->
268
+ <base_url type="media" scope_info="1">magehouse/slider</base_url>
269
+ <!-- same as previous line -->
270
+ <sort_order>30</sort_order>
271
+ <show_in_default>1</show_in_default>
272
+ <show_in_website>1</show_in_website>
273
+ <show_in_store>1</show_in_store>
274
+ <comment>Image to show while the results are loading</comment>
275
+ </loading_image>
276
+ <loading_text><!-- Make up a field key -->
277
+ <label>Results Loading Text</label>
278
+ <frontend_type>text</frontend_type>
279
+ <sort_order>40</sort_order>
280
+ <show_in_default>1</show_in_default>
281
+ <show_in_website>1</show_in_website>
282
+ <show_in_store>1</show_in_store>
283
+ <comment>Text to display when the results are loading via AJAX</comment>
284
+ </loading_text>
285
+ <loading_text_color><!-- Make up a field key -->
286
+ <label>Results Loading Text Color</label>
287
+ <frontend_type>text</frontend_type>
288
+ <sort_order>40</sort_order>
289
+ <show_in_default>1</show_in_default>
290
+ <show_in_website>1</show_in_website>
291
+ <show_in_store>1</show_in_store>
292
+ <comment>Color for text to display when the results are loading via AJAX</comment>
293
+ </loading_text_color>
294
+
295
+ </fields>
296
+ </ajax_conf>
297
  </groups>
298
  </price_slider>
299
  </sections>
app/code/community/Magehouse/Slider/sql/slider_setup/mysql4-install-2.1.0.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+ $installer->startSetup();
5
+ $installer->run("
6
+ DELETE FROM {$installer->getTable('core/config_data')} WHERE path like 'price_slider/price_slider_conf/use_image';
7
+ DELETE FROM {$installer->getTable('core/config_data')} WHERE path like 'price_slider/ajax_conf/layered';
8
+ DELETE FROM {$installer->getTable('core/config_data')} WHERE path like 'price_slider/ajax_conf/slider';
9
+ DELETE FROM {$installer->getTable('core/config_data')} WHERE path like 'price_slider/price_slider_conf/timeout';
10
+ INSERT INTO {$installer->getTable('core/config_data')} VALUES (NULL, 'default', '0', 'price_slider/price_slider_conf/use_image', '1');
11
+ INSERT INTO {$installer->getTable('core/config_data')} VALUES (NULL, 'default', '0', 'price_slider/ajax_conf/layered', '0');
12
+ INSERT INTO {$installer->getTable('core/config_data')} VALUES (NULL, 'default', '0', 'price_slider/ajax_conf/slider', '1');
13
+ INSERT INTO {$installer->getTable('core/config_data')} VALUES (NULL, 'default', '0', 'price_slider/price_slider_conf/timeout', '0');
14
+
15
+ ");
16
+ $installer->endSetup();
app/design/frontend/base/default/layout/slider.xml CHANGED
@@ -4,7 +4,7 @@
4
  <reference name="head">
5
  <block type="core/text" name="google.cdn.jquery.slider" >
6
  <action method="setText" ifconfig="price_slider/price_slider_settings/include_jquery">
7
- <text><![CDATA[<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script><script type="text/javascript">jQuery.noConflict();</script>]]> </text>
8
  </action>
9
  </block>
10
 
@@ -16,12 +16,15 @@
16
 
17
  <action method="addCss" ifconfig="price_slider/price_slider_settings/slider_loader_active"><script>css/slider/jquery-ui-1.8.23.custom.css</script></action>
18
  </reference>
 
 
 
19
  </catalog_category_view>
20
  <catalogsearch_result_index>
21
  <reference name="head">
22
  <block type="core/text" name="google.cdn.jquery.slider" >
23
  <action method="setText" ifconfig="price_slider/price_slider_settings/include_jquery">
24
- <text><![CDATA[<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script><script type="text/javascript">jQuery.noConflict();</script>]]> </text>
25
  </action>
26
  </block>
27
 
@@ -33,5 +36,8 @@
33
 
34
  <action method="addCss" ifconfig="price_slider/price_slider_settings/slider_loader_active"><script>css/slider/jquery-ui-1.8.23.custom.css</script></action>
35
  </reference>
 
 
 
36
  </catalogsearch_result_index>
37
  </layout>
4
  <reference name="head">
5
  <block type="core/text" name="google.cdn.jquery.slider" >
6
  <action method="setText" ifconfig="price_slider/price_slider_settings/include_jquery">
7
+ <text><![CDATA[<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script><script type="text/javascript">jQuery.noConflict();</script>]]></text>
8
  </action>
9
  </block>
10
 
16
 
17
  <action method="addCss" ifconfig="price_slider/price_slider_settings/slider_loader_active"><script>css/slider/jquery-ui-1.8.23.custom.css</script></action>
18
  </reference>
19
+ <reference name="footer">
20
+ <block type="core/template" name="ajaxSlider" template="slider/ajax.phtml" />
21
+ </reference>
22
  </catalog_category_view>
23
  <catalogsearch_result_index>
24
  <reference name="head">
25
  <block type="core/text" name="google.cdn.jquery.slider" >
26
  <action method="setText" ifconfig="price_slider/price_slider_settings/include_jquery">
27
+ <text><![CDATA[<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script><script type="text/javascript">jQuery.noConflict();</script>]]></text>
28
  </action>
29
  </block>
30
 
36
 
37
  <action method="addCss" ifconfig="price_slider/price_slider_settings/slider_loader_active"><script>css/slider/jquery-ui-1.8.23.custom.css</script></action>
38
  </reference>
39
+ <reference name="footer">
40
+ <block type="core/template" name="ajaxSlider" template="slider/ajax.phtml" />
41
+ </reference>
42
  </catalogsearch_result_index>
43
  </layout>
app/design/frontend/base/default/template/slider/ajax.phtml ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $config = Mage::getStoreConfig('price_slider');
3
+ $url = Mage::getStoreConfig('web/unsecure/base_url');
4
+
5
+ $ajaxSlider = $config['ajax_conf']['slider'];
6
+ $ajaxLayered = $config['ajax_conf']['layered'];
7
+ $ajaxToolbar = $config['ajax_conf']['toolbar'];
8
+ $overlayColor = $config['ajax_conf']['overlay_color'];
9
+ $overlayOpacity = $config['ajax_conf']['overlay_opacity'];
10
+ $loadingText = $config['ajax_conf']['loading_text'];
11
+ $loadingTextColor = $config['ajax_conf']['loading_text_color'];
12
+ $loadingImage = $config['ajax_conf']['loading_image'];
13
+ if($loadingImage == '' || $loadingImage == null){
14
+ $loadingImage = $url.'media/magehouse/slider/default/ajax-loader.gif';
15
+ }else{
16
+ $loadingImage = $url.'media/magehouse/slider/default/'.$loadingImage;
17
+ }
18
+ ?>
19
+
20
+ <script type="text/javascript">
21
+ var data = "";
22
+ var active = false;
23
+ jQuery(function($){
24
+ $('.main').append('<div id="resultLoading"><div><img src="<?php echo $loadingImage ?>"><div><?php echo $loadingText ?></div></div><div class="bg"></div></div>');
25
+ var height = $('.main').height();
26
+ var width = $('.main').width();
27
+ $('.ui-slider-handle').css('cursor','pointer');
28
+
29
+ $('#resultLoading').css({
30
+ 'width':width,
31
+ 'height':'100%',
32
+ 'position':'absolute',
33
+ 'display':'none',
34
+ 'z-index':'10000000',
35
+ 'top':'0',
36
+ 'left':'0'
37
+ });
38
+ $('#resultLoading .bg').css({
39
+ 'background':'<?php echo $overlayColor; ?>',
40
+ 'opacity':'<?php echo $overlayOpacity ?>',
41
+ 'width':'100%',
42
+ 'height':height,
43
+ 'position':'absolute',
44
+ 'top':'0'
45
+ });
46
+ $('#resultLoading>div:first').css({
47
+ 'width': '100%',
48
+ 'text-align': 'center',
49
+ 'position': 'absolute',
50
+ 'left': '0',
51
+ 'margin-top': '22em',
52
+ 'font-size':'16px',
53
+ 'z-index':'10',
54
+ 'color':'<?php echo $loadingTextColor ?>'
55
+
56
+ });
57
+
58
+ <?php if($ajaxLayered): ?>
59
+ var _0x34ae=["\x63\x6C\x69\x63\x6B","\x68\x72\x65\x66","\x61\x74\x74\x72","\x70\x72\x65\x76\x65\x6E\x74\x44\x65\x66\x61\x75\x6C\x74","\x6C\x69\x76\x65","\x2E\x62\x6C\x6F\x63\x6B\x2D\x6C\x61\x79\x65\x72\x65\x64\x2D\x6E\x61\x76\x20\x61"];$(_0x34ae[5])[_0x34ae[4]](_0x34ae[0],function (_0x1f55x1){var _0x1f55x2=$(this)[_0x34ae[2]](_0x34ae[1]);sliderAjax(_0x1f55x2);_0x1f55x1[_0x34ae[3]]();} );
60
+ <?php endif; ?>
61
+
62
+
63
+ <?php if($ajaxToolbar): ?>
64
+ eval(function(p,a,c,k,e,d){while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+c.toString(a)+'\\b','g'),k[c])}}return p}('$(\'.1 a\').3(\'9\',5(e){6 0=$(8).c(\'b\');7(0);e.2()});$(\'.1 4\').d(\'g\');$(\'.1 4\').3(\'f\',5(){6 0=$(8).h();7(0);e.2()})',18,18,'url|toolbar|preventDefault|live|select|function|var|sliderAjax|this|click||href|attr|removeAttr||change|onchange|val'.split('|')))
65
+ <?php endif; ?>
66
+
67
+
68
+ });
69
+
70
+ <?php if($ajaxSlider || $ajaxLayered): ?>
71
+ /*DONOT EDIT THIS CODE*/
72
+ eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('9 s(1){2(!8){8=r;q(9($){p=1;$(\'#4 .j\').3($(\'.f\').3());$(\'#4\').t(g);u{$(\'7\').h(\'m\',\'y\');$.o({1:1,x:\'w\',v:\'z\',0:0,n:9(0){2(0.c){2($(\'.5-6\')){$(\'.5-6\').a();$(\'.5-6\').k(0.c)}}2(0.i){$(\'.b-l\').a();$(\'.b-l\').k(0.i)}I L=1.K(\'?\');A.M.N(\'P\',0.O,1);$(\'7\').Q(\'.J D\').C(\'B\');$(\'#4 .j\').3($(\'.f\').3());$(\'#4\').E(g);$(\'7\').h(\'m\',\'F\')}})}H(e){}});8=d}G d}',53,53,'data|url|if|height|resultLoading|col|left|body|active|function|empty|category|viewpanel|false||main|300|css|productlist|bg|append|products|cursor|success|ajax|oldUrl|jQuery|true|sliderAjax|fadeIn|try|type|json|dataType|wait|post|window|onchange|removeAttr|select|fadeOut|default|return|catch|var|toolbar|split|hist|history|pushState|title|GET|find'.split('|')))
73
+ <?php endif; ?>
74
+
75
+ </script>
76
+
media/magehouse/slider/default/ajax-loader.gif ADDED
Binary file
media/magehouse/slider/default/handle.png ADDED
Binary file
media/magehouse/slider/default/handle_1.png ADDED
Binary file
media/magehouse/slider/default/range-bg.jpg ADDED
Binary file
media/magehouse/slider/default/slider-bg.jpg ADDED
Binary file
package.xml CHANGED
@@ -1,15 +1,17 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Magehouse_Slider</name>
4
- <version>2.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Price Range Slider</summary>
10
  <description>Free module for Price range Slider.&#xD;
11
  &#xD;
12
- This replaces the default price filter by a simple and elegant range slider.</description>
 
 
13
  <notes>First Release&#xD;
14
  &#xD;
15
  Features: &#xD;
@@ -45,11 +47,18 @@ Bugs Solved :&#xD;
45
  &#xD;
46
  Improvements:&#xD;
47
  - Price Slider now available on search page also&#xD;
 
 
 
 
 
 
 
48
  </notes>
49
  <authors><author><name>Mrugesh Mistry</name><user>mrugeshrocks</user><email>mrugesh.rocks@gmail.com</email></author></authors>
50
- <date>2012-11-07</date>
51
- <time>21:46:51</time>
52
- <contents><target name="magecommunity"><dir name="Magehouse"><dir name="Slider"><dir name="Block"><dir name="Catalog"><dir name="Layer"><dir name="Filter"><dir name="Price"><file name="Slider.php" hash="a856cbd9e4d8e8dc7355f5d2258988bb"/></dir><file name="Price.php" hash="85e227e7f5ecda256e42b832956cfe54"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="a065b8f56bbda2943734e76139883220"/></dir><dir name="Model"><dir name="Catalog"><file name="Layer.php" hash="6a721e4f0118d0353a9f6b7838c5aeaf"/></dir><dir name="Catalogsearch"><file name="Layer.php" hash="e75760252676747cd68039c6ba4920f6"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="c728cee82276d42e77808bf48fdd0cdf"/><file name="config.xml" hash="f5766d492dcc0aef353d97b07c201620"/><file name="system.xml" hash="3c7bd19dd730500a9271f762624552ce"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magehouse_Slider.xml" hash="43112ba587c13efb57d3b9471498a814"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="slider"><dir name="images"><file name="Thumbs.db" hash="c192da3c422ad168eecbe155887757f4"/><file name="ui-bg_diagonals-thick_18_b81900_40x40.png" hash="95f9cceeb9d742dd3e917ec16ed754f8"/><file name="ui-bg_diagonals-thick_20_666666_40x40.png" hash="f040b255ca13e693da34ab33c7d6b554"/><file name="ui-bg_flat_10_000000_40x100.png" hash="c18cd01623c7fed23c80d53e2f5e7c78"/><file name="ui-bg_glass_100_f6f6f6_1x400.png" hash="4c494f261d76fd2c344853b64a09371b"/><file name="ui-bg_glass_100_fdf5ce_1x400.png" hash="4c494f261d76fd2c344853b64a09371b"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="4c494f261d76fd2c344853b64a09371b"/><file name="ui-bg_gloss-wave_35_f6a828_500x100.png" hash="8c06b9c15ea2bef5ff5f1c7468bdc106"/><file name="ui-bg_highlight-soft_100_eeeeee_1x100.png" hash="f00e2ff3af640da7ee8915791b947349"/><file name="ui-bg_highlight-soft_75_ffe45c_1x100.png" hash="b806658954cb4d16ade8977af737f486"/><file name="ui-icons_222222_256x240.png" hash="ebe6b6902a408fbf9cac6379a1477525"/><file name="ui-icons_228ef1_256x240.png" hash="79f41c0765e9ec18562b20b0801d748b"/><file name="ui-icons_ef8c08_256x240.png" hash="ef9a6ccfe3b14041928ddc708665b226"/><file name="ui-icons_ffd27a_256x240.png" hash="39c5a5f53ff0e6cebaec731706427bbb"/><file name="ui-icons_ffffff_256x240.png" hash="342bc03f6264c75d3f1d7f99e34295b9"/></dir><file name="jquery-ui-1.8.23.custom.css" hash="408147096939c6ddb0becced6cdc1197"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="slider.xml" hash="da969ff5627360deff16fcdaba4468ed"/></dir></dir></dir></dir></target></contents>
53
  <compatible/>
54
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
55
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Magehouse_Slider</name>
4
+ <version>2.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>AJAX Layered navigation &amp; toolbar with price slider.</summary>
10
  <description>Free module for Price range Slider.&#xD;
11
  &#xD;
12
+ This replaces the default price filter by a simple and elegant range slider.&#xD;
13
+ &#xD;
14
+ Also provides with ajax toolbar and layered navigation</description>
15
  <notes>First Release&#xD;
16
  &#xD;
17
  Features: &#xD;
47
  &#xD;
48
  Improvements:&#xD;
49
  - Price Slider now available on search page also&#xD;
50
+ &#xD;
51
+ Relase Notes 2.1.0&#xD;
52
+ &#xD;
53
+ Improvements:&#xD;
54
+ - AJAX price slider on both category and search pages&#xD;
55
+ - AJAX layered navigation can also be enabled&#xD;
56
+ - AJAX Toolbar can also be enabled&#xD;
57
  </notes>
58
  <authors><author><name>Mrugesh Mistry</name><user>mrugeshrocks</user><email>mrugesh.rocks@gmail.com</email></author></authors>
59
+ <date>2013-01-03</date>
60
+ <time>16:23:21</time>
61
+ <contents><target name="magecommunity"><dir name="Magehouse"><dir name="Slider"><dir name="Block"><dir name="Catalog"><dir name="Layer"><dir name="Filter"><file name="Price.php" hash="b035dba0be61b43594a70939755f05e8"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="a065b8f56bbda2943734e76139883220"/></dir><dir name="Model"><dir name="Catalog"><file name="Layer.php" hash="6a721e4f0118d0353a9f6b7838c5aeaf"/></dir><dir name="Catalogsearch"><file name="Layer.php" hash="e75760252676747cd68039c6ba4920f6"/></dir><dir name="Resource"><file name="Setup.php" hash="adf2aaa164649ba2a335545303ee1600"/></dir></dir><dir name="controllers"><dir name="Catalog"><file name="CategoryController.php" hash="c7dde356bb55b306484efac577573625"/></dir><dir name="CatalogSearch"><file name="ResultController.php" hash="55903199aa1e17657e9be4082e09a813"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="c728cee82276d42e77808bf48fdd0cdf"/><file name="config.xml" hash="66176baacd73059641bc824283b25306"/><file name="system.xml" hash="83978053d99367987bf8ff0748bcf64c"/></dir><dir name="sql"><dir name="slider_setup"><file name="mysql4-install-2.1.0.php" hash="12d0c01013cbeadce8d5b6d3e7b148d2"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magehouse_Slider.xml" hash="43112ba587c13efb57d3b9471498a814"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="slider"><dir name="images"><file name="Thumbs.db" hash="c192da3c422ad168eecbe155887757f4"/><file name="ui-bg_diagonals-thick_18_b81900_40x40.png" hash="95f9cceeb9d742dd3e917ec16ed754f8"/><file name="ui-bg_diagonals-thick_20_666666_40x40.png" hash="f040b255ca13e693da34ab33c7d6b554"/><file name="ui-bg_flat_10_000000_40x100.png" hash="c18cd01623c7fed23c80d53e2f5e7c78"/><file name="ui-bg_glass_100_f6f6f6_1x400.png" hash="4c494f261d76fd2c344853b64a09371b"/><file name="ui-bg_glass_100_fdf5ce_1x400.png" hash="4c494f261d76fd2c344853b64a09371b"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="4c494f261d76fd2c344853b64a09371b"/><file name="ui-bg_gloss-wave_35_f6a828_500x100.png" hash="8c06b9c15ea2bef5ff5f1c7468bdc106"/><file name="ui-bg_highlight-soft_100_eeeeee_1x100.png" hash="f00e2ff3af640da7ee8915791b947349"/><file name="ui-bg_highlight-soft_75_ffe45c_1x100.png" hash="b806658954cb4d16ade8977af737f486"/><file name="ui-icons_222222_256x240.png" hash="ebe6b6902a408fbf9cac6379a1477525"/><file name="ui-icons_228ef1_256x240.png" hash="79f41c0765e9ec18562b20b0801d748b"/><file name="ui-icons_ef8c08_256x240.png" hash="ef9a6ccfe3b14041928ddc708665b226"/><file name="ui-icons_ffd27a_256x240.png" hash="39c5a5f53ff0e6cebaec731706427bbb"/><file name="ui-icons_ffffff_256x240.png" hash="342bc03f6264c75d3f1d7f99e34295b9"/></dir><file name="jquery-ui-1.8.23.custom.css" hash="408147096939c6ddb0becced6cdc1197"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="slider.xml" hash="5774f2689b4221c4f8a0a73c8704e57b"/></dir><dir name="template"><dir name="slider"><file name="ajax.phtml" hash="aea1974a360c4c61fbd91d9126458cfd"/></dir></dir></dir></dir></dir></target><target name="magemedia"><dir name="magehouse"><dir name="slider"><dir name="default"><file name="ajax-loader.gif" hash="f9b76dc9bba462ece85fc9d7f8f2c33e"/><file name="handle.png" hash="4c494f261d76fd2c344853b64a09371b"/><file name="handle_1.png" hash="4c494f261d76fd2c344853b64a09371b"/><file name="range-bg.jpg" hash="8c06b9c15ea2bef5ff5f1c7468bdc106"/><file name="slider-bg.jpg" hash="f00e2ff3af640da7ee8915791b947349"/></dir></dir></dir></target></contents>
62
  <compatible/>
63
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
64
  </package>