vjt_onsalevertcarousel - Version 1.0.2

Version Notes

Initial Release

Download this release

Release Info

Developer VJ Templates
Extension vjt_onsalevertcarousel
Version 1.0.2
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.2

app/code/community/VJTemplates/OnSaleVertCarousel/Block/Product/OnSale.php CHANGED
@@ -14,8 +14,6 @@ class VJTemplates_OnSaleVertCarousel_Block_Product_OnSale extends Mage_Catalog_B
14
  public function getOnSaleProduct(){
15
 
16
  $product = Mage::getModel('catalog/product');
17
- if($this->getCategoryId())
18
- $category = Mage::getModel('catalog/category')->load($this->getCategoryId());
19
 
20
  $collection = $product->getCollection()
21
  ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
@@ -32,9 +30,21 @@ class VJTemplates_OnSaleVertCarousel_Block_Product_OnSale extends Mage_Catalog_B
32
  1 => array("is" => new Zend_Db_Expr("null")))
33
  ), "left");
34
 
35
- if(isset($category)) {
36
- $collection->addCategoryFilter($category);
37
- }
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
  $collection ->addStoreFilter();
40
  $current_categoryId = Mage::getModel('catalog/layer')->getCurrentCategory()->getId();
14
  public function getOnSaleProduct(){
15
 
16
  $product = Mage::getModel('catalog/product');
 
 
17
 
18
  $collection = $product->getCollection()
19
  ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
30
  1 => array("is" => new Zend_Db_Expr("null")))
31
  ), "left");
32
 
33
+ if($this->getCategoryId()) {
34
+ $CategoryIds = explode(',',$this->getCategoryId());
35
+ foreach($CategoryIds as $CategoryId) {
36
+ if ($CategoryId->hasChildren()) {
37
+ $AllChildren = Mage::getModel('catalog/category')->load($CategoryId)->getAllChildren($asArray = true);
38
+ foreach($AllChildren as $Child) {
39
+ $category = Mage::getModel('catalog/category')->load($Child);
40
+ $collection->addCategoryFilter($category);
41
+ }
42
+ } else {
43
+ $category = Mage::getModel('catalog/category')->load($CategoryId);
44
+ $collection->addCategoryFilter($category);
45
+ }
46
+ }
47
+ }
48
 
49
  $collection ->addStoreFilter();
50
  $current_categoryId = Mage::getModel('catalog/layer')->getCurrentCategory()->getId();
app/code/community/VJTemplates/OnSaleVertCarousel/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <VJTemplates_OnSaleVertCarousel>
5
- <version>1.0.1</version>
6
  </VJTemplates_OnSaleVertCarousel>
7
  </modules>
8
  <frontend>
2
  <config>
3
  <modules>
4
  <VJTemplates_OnSaleVertCarousel>
5
+ <version>1.0.2</version>
6
  </VJTemplates_OnSaleVertCarousel>
7
  </modules>
8
  <frontend>
app/design/frontend/{default → base}/default/layout/vjtemplates/onsalevertcarousel.xml RENAMED
File without changes
app/design/frontend/{default → base}/default/template/vjtemplates/catalog/product/onsale-vert-carousel.phtml RENAMED
File without changes
app/etc/modules/VJTemplates_OnSaleVertCarousel.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <VJTemplates_OnSaleVertCarousel>
5
- <active>true</active>
6
  <codePool>community</codePool>
7
  </VJTemplates_OnSaleVertCarousel>
8
  </modules>
2
  <config>
3
  <modules>
4
  <VJTemplates_OnSaleVertCarousel>
5
+ <active>false</active>
6
  <codePool>community</codePool>
7
  </VJTemplates_OnSaleVertCarousel>
8
  </modules>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>vjt_onsalevertcarousel</name>
4
- <version>1.0.1</version>
5
  <stability>stable</stability>
6
- <license>GNU</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Show On Sale Products in Vertical Carousel</summary>
10
  <description>Show On Sale or Special Price Products in Vertical Carousel Style</description>
11
  <notes>Initial Release</notes>
12
  <authors><author><name>VJ Templates</name><user>vjtemplates</user><email>vjt@vjtemplates.com</email></author></authors>
13
- <date>2012-09-03</date>
14
- <time>00:14:56</time>
15
- <contents><target name="magecommunity"><dir name="VJTemplates"><dir name="OnSaleVertCarousel"><dir name="Block"><dir name="Category"><file name="View.php" hash="85c92a409c24d6ae75a709b6ccedc188"/></dir><dir name="Product"><file name="OnSale.php" hash="9ad9a3de971912f3d0cdc2b27e10224f"/></dir></dir><dir name="etc"><file name="config.xml" hash="681e5191d4130ea1f6bf960b96ca081b"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><dir name="vjtemplates"><file name="onsalevertcarousel.xml" hash="c78655c26a88cc8db7bceb5fc761929c"/></dir></dir><dir name="template"><dir name="vjtemplates"><dir name="catalog"><dir name="product"><file name="onsale-vert-carousel.phtml" hash="4da9ee56d7d3bf4b01046643673b7f1f"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="VJTemplates_OnSaleVertCarousel.xml" hash="400c52b65a5cc550436abfdefdce2eb6"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="vjtemplates"><dir name="css"><file name="onsale-vert-carousel.css" hash="3cf2277f0b68e9c0ddbe87c1909aa5df"/></dir><dir name="images"><file name="next-vertical.png" hash="212fd0ed9d02dd77508cbc398e6b36ea"/><file name="prev-vertical.png" hash="360f02103258cc26eea3683da5605e89"/></dir><dir name="js"><file name="onsale-carousel.js" hash="678439bb3993ebf66629e23b59d8c811"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="jquery"><file name="jquery-1.6.4.min.js" hash="0bd074f6e49da04536b3ce289e3f7448"/></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>vjt_onsalevertcarousel</name>
4
+ <version>1.0.2</version>
5
  <stability>stable</stability>
6
+ <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Show On Sale Products in Vertical Carousel</summary>
10
  <description>Show On Sale or Special Price Products in Vertical Carousel Style</description>
11
  <notes>Initial Release</notes>
12
  <authors><author><name>VJ Templates</name><user>vjtemplates</user><email>vjt@vjtemplates.com</email></author></authors>
13
+ <date>2012-09-14</date>
14
+ <time>17:21:49</time>
15
+ <contents><target name="magecommunity"><dir name="VJTemplates"><dir name="OnSaleVertCarousel"><dir name="Block"><dir name="Category"><file name="View.php" hash="85c92a409c24d6ae75a709b6ccedc188"/></dir><dir name="Product"><file name="OnSale.php" hash="bb38ae2bae1dffc406f7de797dd0fd66"/></dir></dir><dir name="etc"><file name="config.xml" hash="ba3db2eaec07fbad814338c4dc9fad1f"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="vjtemplates"><file name="onsalevertcarousel.xml" hash="c78655c26a88cc8db7bceb5fc761929c"/></dir></dir><dir name="template"><dir name="vjtemplates"><dir name="catalog"><dir name="product"><file name="onsale-vert-carousel.phtml" hash="4da9ee56d7d3bf4b01046643673b7f1f"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="VJTemplates_OnSaleVertCarousel.xml" hash="5c5835c90953dbe3288def3387ac67b1"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="vjtemplates"><dir name="css"><file name="onsale-vert-carousel.css" hash="3cf2277f0b68e9c0ddbe87c1909aa5df"/></dir><dir name="images"><file name="next-vertical.png" hash="212fd0ed9d02dd77508cbc398e6b36ea"/><file name="prev-vertical.png" hash="360f02103258cc26eea3683da5605e89"/></dir><dir name="js"><file name="onsale-carousel.js" hash="678439bb3993ebf66629e23b59d8c811"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="jquery"><file name="jquery-1.6.4.min.js" hash="0bd074f6e49da04536b3ce289e3f7448"/></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
skin/frontend/{default → base}/default/vjtemplates/css/onsale-vert-carousel.css RENAMED
File without changes
skin/frontend/{default → base}/default/vjtemplates/images/next-vertical.png RENAMED
File without changes
skin/frontend/{default → base}/default/vjtemplates/images/prev-vertical.png RENAMED
File without changes
skin/frontend/{default → base}/default/vjtemplates/js/onsale-carousel.js RENAMED
File without changes