Magehouse_Slider - Version 1.0.5

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

Download this release

Release Info

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


Code changes from version 1.0.4 to 1.0.5

app/code/community/Magehouse/Slider/Block/Catalog/Layer/{View.php → Filter/Price.php} RENAMED
@@ -1,16 +1,14 @@
1
- <?php
2
-
3
  /**
4
- * Catalog layer price filter
5
  *
6
- * @category Mage
7
- * @package Mage_Catalog
8
- * @author Magento Core Team <core@magentocommerce.com>
9
  */
10
-
11
- class Magehouse_Slider_Block_Catalog_Layer_View extends Mage_Catalog_Block_Layer_View
12
  {
13
-
14
  public $_currentCategory;
15
  public $_productCollection;
16
  public $_maxPrice;
@@ -36,8 +34,8 @@ class Magehouse_Slider_Block_Catalog_Layer_View extends Mage_Catalog_Block_Layer
36
  else
37
  return false;
38
  }
39
-
40
- public function getSlider(){
41
  if($this->getSliderStatus()){
42
  $text='
43
  <div class="price">
@@ -45,7 +43,8 @@ class Magehouse_Slider_Block_Catalog_Layer_View extends Mage_Catalog_Block_Layer
45
  <input type="text" id="amount" readonly="readonly" style="background:none; border:none;" />
46
  </p>
47
  <div id="slider-range"></div>
48
- </div>
 
49
  ';
50
 
51
  return $text;
@@ -66,6 +65,10 @@ class Magehouse_Slider_Block_Catalog_Layer_View extends Mage_Catalog_Block_Layer
66
  return $url;
67
  }
68
 
 
 
 
 
69
  public function getSliderJs(){
70
  $baseUrl = $this->_currentCategory->getUrl();
71
  $timeout = $this->getConfig('price_slider/price_slider_conf/timeout');
@@ -81,11 +84,11 @@ class Magehouse_Slider_Block_Catalog_Layer_View extends Mage_Catalog_Block_Layer
81
  max: '.$this->_maxPrice.',
82
  values: [ '.$min.', '.$max.' ],
83
  slide: function( event, ui ) {
84
- $( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
85
  },stop: function( event, ui ) {
86
  var x1 = ui.values[0];
87
  var x2 = ui.values[1];
88
- $( "#amount" ).val( "$"+x1+" - $"+x2 );
89
  var url = "'.$baseUrl.'"+"/?min="+x1+"&max="+x2+"'.$this->prepareParams().'";
90
  if(x1 != '.$min.' && x2 != '.$max.'){
91
  clearTimeout(timer);
@@ -97,8 +100,8 @@ class Magehouse_Slider_Block_Catalog_Layer_View extends Mage_Catalog_Block_Layer
97
  }
98
  }
99
  });
100
- $( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) +
101
- " - $" + $( "#slider-range" ).slider( "values", 1 ) );
102
  });
103
  </script>
104
 
@@ -181,7 +184,4 @@ class Magehouse_Slider_Block_Catalog_Layer_View extends Mage_Catalog_Block_Layer
181
  $this->_currMinPrice = $this->getRequest()->getParam('min');
182
  $this->_currMaxPrice = $this->getRequest()->getParam('max');
183
  }
184
-
185
  }
186
-
187
- ?>
1
+ <?php
 
2
  /**
3
+ * Catalog Price Slider
4
  *
5
+ * @category Magehouse
6
+ * @class Magehouse_Slider_Block_Catalog_Layer_Filter_Price
7
+ * @author Mrugesh Mistry <core@magentocommerce.com>
8
  */
9
+ class Magehouse_Slider_Block_Catalog_Layer_Filter_Price extends Mage_Catalog_Block_Layer_Filter_Price
 
10
  {
11
+
12
  public $_currentCategory;
13
  public $_productCollection;
14
  public $_maxPrice;
34
  else
35
  return false;
36
  }
37
+
38
+ public function getHtml(){
39
  if($this->getSliderStatus()){
40
  $text='
41
  <div class="price">
43
  <input type="text" id="amount" readonly="readonly" style="background:none; border:none;" />
44
  </p>
45
  <div id="slider-range"></div>
46
+
47
+ </div>'.$this->getSliderJs().'
48
  ';
49
 
50
  return $text;
65
  return $url;
66
  }
67
 
68
+ public function getCurrencySymbol(){
69
+ return Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();
70
+ }
71
+
72
  public function getSliderJs(){
73
  $baseUrl = $this->_currentCategory->getUrl();
74
  $timeout = $this->getConfig('price_slider/price_slider_conf/timeout');
84
  max: '.$this->_maxPrice.',
85
  values: [ '.$min.', '.$max.' ],
86
  slide: function( event, ui ) {
87
+ $( "#amount" ).val( "'.$this->getCurrencySymbol().'" + ui.values[ 0 ] + " - '.$this->getCurrencySymbol().'" + ui.values[ 1 ] );
88
  },stop: function( event, ui ) {
89
  var x1 = ui.values[0];
90
  var x2 = ui.values[1];
91
+ $( "#amount" ).val( "'.$this->getCurrencySymbol().'"+x1+" - '.$this->getCurrencySymbol().'"+x2 );
92
  var url = "'.$baseUrl.'"+"/?min="+x1+"&max="+x2+"'.$this->prepareParams().'";
93
  if(x1 != '.$min.' && x2 != '.$max.'){
94
  clearTimeout(timer);
100
  }
101
  }
102
  });
103
+ $( "#amount" ).val( "'.$this->getCurrencySymbol().'" + $( "#slider-range" ).slider( "values", 0 ) +
104
+ " - '.$this->getCurrencySymbol().'" + $( "#slider-range" ).slider( "values", 1 ) );
105
  });
106
  </script>
107
 
184
  $this->_currMinPrice = $this->getRequest()->getParam('min');
185
  $this->_currMaxPrice = $this->getRequest()->getParam('max');
186
  }
 
187
  }
 
 
app/code/community/Magehouse/Slider/Block/Catalog/Layer/Filter/Price/Slider.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
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/etc/config.xml CHANGED
@@ -14,7 +14,7 @@
14
  <blocks>
15
  <catalog>
16
  <rewrite>
17
- <layer_view>Magehouse_Slider_Block_Catalog_Layer_View</layer_view>
18
  </rewrite>
19
  </catalog>
20
  </blocks>
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>
app/design/frontend/default/default/template/catalog/layer/view.phtml DELETED
@@ -1,67 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
8
- * that is bundled with this package in the file LICENSE_AFL.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/afl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category design
22
- * @package base_default
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
- */
26
- ?>
27
- <?php
28
- /**
29
- * Category layered navigation
30
- *
31
- * @see Mage_Catalog_Block_Layer_View
32
- */
33
- ?>
34
- <?php if($this->canShowBlock()): ?>
35
- <div class="block block-layered-nav">
36
- <div class="block-title">
37
- <strong><span><?php echo $this->__('Shop By') ?></span></strong>
38
- </div>
39
- <div class="block-content">
40
- <?php echo $this->getStateHtml() ?>
41
- <?php if ($this->getLayer()->getState()->getFilters()): ?>
42
- <div class="actions"><a href="<?php echo $this->getClearUrl() ?>"><?php echo $this->__('Clear All') ?></a></div>
43
- <?php endif; ?>
44
- <?php if($this->canShowOptions()): ?>
45
- <p class="block-subtitle"><?php echo $this->__('Shopping Options') ?></p>
46
- <dl id="narrow-by-list">
47
- <?php $_filters = $this->getFilters() ?>
48
- <?php foreach ($_filters as $_filter): ?>
49
-
50
- <?php if($_filter->getItemsCount()): ?>
51
- <dt><?php echo $this->__($_filter->getName()) ?></dt>
52
- <dd>
53
- <?php if(strtolower($_filter->getName()) != 'price'): ?>
54
- <?php echo $_filter->getHtml() ?>
55
- <?php else: ?>
56
- <?php echo $this->getSlider(); ?>
57
- <?php endif; ?>
58
- </dd>
59
- <?php endif; ?>
60
- <?php endforeach; ?>
61
- </dl>
62
- <script type="text/javascript">decorateDataList('narrow-by-list')</script>
63
- <?php echo $this->getSliderJs(); ?>
64
- <?php endif; ?>
65
- </div>
66
- </div>
67
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Magehouse_Slider</name>
4
- <version>1.0.4</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>
@@ -28,11 +28,20 @@ Relase Notes 1.0.3&#xD;
28
  &#xD;
29
  Relase Notes 1.0.4&#xD;
30
  &#xD;
31
- - Added : Special Price in filtering</notes>
 
 
 
 
 
 
 
 
 
32
  <authors><author><name>Mrugesh Mistry</name><user>mrugeshrocks</user><email>mrugesh.rocks@gmail.com</email></author></authors>
33
- <date>2012-10-05</date>
34
- <time>17:18:55</time>
35
- <contents><target name="magecommunity"><dir name="Magehouse"><dir name="Slider"><dir name="Block"><dir name="Catalog"><dir name="Layer"><file name="View.php" hash="27631276fdb401a0d6cda7292f89e1fc"/></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><dir name="etc"><file name="adminhtml.xml" hash="c728cee82276d42e77808bf48fdd0cdf"/><file name="config.xml" hash="5a55ba91f82a7607db99ab71ff0c060d"/><file name="system.xml" hash="3c7bd19dd730500a9271f762624552ce"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="catalog"><dir name="layer"><file name="view.phtml" hash="add1b1c7a2ec9fc6c48f9bc626504e07"/></dir></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="layout"><file name="slider.xml" hash="059f6a61697fda8974f1dc52e9cf291d"/></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></contents>
36
  <compatible/>
37
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
38
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Magehouse_Slider</name>
4
+ <version>1.0.5</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>
28
  &#xD;
29
  Relase Notes 1.0.4&#xD;
30
  &#xD;
31
+ - Added : Special Price in filtering&#xD;
32
+ &#xD;
33
+ Relase Notes 1.0.5&#xD;
34
+ &#xD;
35
+ Bugs Solved :&#xD;
36
+ - Currency symbol do not change - Solved&#xD;
37
+ &#xD;
38
+ Improvements:&#xD;
39
+ - Removed theme file dependency&#xD;
40
+ </notes>
41
  <authors><author><name>Mrugesh Mistry</name><user>mrugeshrocks</user><email>mrugesh.rocks@gmail.com</email></author></authors>
42
+ <date>2012-11-06</date>
43
+ <time>22:12:01</time>
44
+ <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="4b96409f75ca21f0ae4cd9afda4b9daa"/></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><dir name="etc"><file name="adminhtml.xml" hash="c728cee82276d42e77808bf48fdd0cdf"/><file name="config.xml" hash="d407f9a60301cc33eedcf607445ad68d"/><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="059f6a61697fda8974f1dc52e9cf291d"/></dir></dir></dir></dir></target></contents>
45
  <compatible/>
46
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
47
  </package>