vjt_onsalehorzcarousel - Version 1.0.1

Version Notes

Initial release

Download this release

Release Info

Developer VJ Templates
Extension vjt_onsalehorzcarousel
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/community/VJTemplates/OnSaleHorzCarousel/Block/Product/OnSale.php CHANGED
@@ -14,8 +14,6 @@ class VJTemplates_OnSaleHorzCarousel_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_OnSaleHorzCarousel_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/OnSaleHorzCarousel/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <VJTemplates_OnSaleHorzCarousel>
5
- <version>1.0.0</version>
6
  </VJTemplates_OnSaleHorzCarousel>
7
  </modules>
8
  <frontend>
2
  <config>
3
  <modules>
4
  <VJTemplates_OnSaleHorzCarousel>
5
+ <version>1.0.1</version>
6
  </VJTemplates_OnSaleHorzCarousel>
7
  </modules>
8
  <frontend>
app/design/frontend/{default → base}/default/layout/vjtemplates/onsalehorzcarousel.xml RENAMED
File without changes
app/design/frontend/{default → base}/default/template/vjtemplates/catalog/product/onsale-horz-carousel.phtml RENAMED
File without changes
app/etc/modules/VJTemplates_OnSaleHorzCarousel.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <VJTemplates_OnSaleHorzCarousel>
5
- <active>true</active>
6
  <codePool>community</codePool>
7
  </VJTemplates_OnSaleHorzCarousel>
8
  </modules>
2
  <config>
3
  <modules>
4
  <VJTemplates_OnSaleHorzCarousel>
5
+ <active>false</active>
6
  <codePool>community</codePool>
7
  </VJTemplates_OnSaleHorzCarousel>
8
  </modules>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>vjt_onsalehorzcarousel</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
- <license>GNU</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Show On Sale Products in Horizontal Carousel</summary>
10
  <description>Show On Sale or Special Price Products in Horizontal 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:07:21</time>
15
- <contents><target name="magecommunity"><dir name="VJTemplates"><dir name="OnSaleHorzCarousel"><dir name="Block"><dir name="Category"><file name="View.php" hash="25fa66a6deed29ea7ec4a65822f12b81"/></dir><dir name="Product"><file name="OnSale.php" hash="068b767dc27c37cc4e7400ac4e1fd61b"/></dir></dir><dir name="etc"><file name="config.xml" hash="be4431f0c35038a4ab1b2e4e0a93a3de"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><dir name="vjtemplates"><file name="onsalehorzcarousel.xml" hash="798961bfc36f34271b68d1785cf5d756"/></dir></dir><dir name="template"><dir name="vjtemplates"><dir name="catalog"><dir name="product"><file name="onsale-horz-carousel.phtml" hash="4a16aee4e184da2f05fb485c07663408"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="VJTemplates_OnSaleHorzCarousel.xml" hash="af9b51b84f93f1d523e1ad73d58b3761"/></dir></target><target name="mage"><dir name="js"><dir name="jquery"><file name="jquery-1.6.4.min.js" hash="0bd074f6e49da04536b3ce289e3f7448"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="vjtemplates"><dir name="css"><file name="onsale-horz-carousel.css" hash="42fa8ce56fe62e2bbf1050cf23d8c5ce"/></dir><dir name="images"><file name="next-horizontal.png" hash="fa5bfea6029803d4382e257f3e407269"/><file name="prev-horizontal.png" hash="e9e56e2851122f2c3322e3f36841a66b"/></dir><dir name="js"><file name="onsale-carousel.js" hash="678439bb3993ebf66629e23b59d8c811"/></dir></dir></dir></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_onsalehorzcarousel</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
+ <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Show On Sale Products in Horizontal Carousel</summary>
10
  <description>Show On Sale or Special Price Products in Horizontal 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:20:14</time>
15
+ <contents><target name="magecommunity"><dir name="VJTemplates"><dir name="OnSaleHorzCarousel"><dir name="Block"><dir name="Category"><file name="View.php" hash="25fa66a6deed29ea7ec4a65822f12b81"/></dir><dir name="Product"><file name="OnSale.php" hash="d70392ff4341f55e2595efd4ee65f14b"/></dir></dir><dir name="etc"><file name="config.xml" hash="8817aabcc060957de1144620c336724f"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="vjtemplates"><file name="onsalehorzcarousel.xml" hash="798961bfc36f34271b68d1785cf5d756"/></dir></dir><dir name="template"><dir name="vjtemplates"><dir name="catalog"><dir name="product"><file name="onsale-horz-carousel.phtml" hash="4a16aee4e184da2f05fb485c07663408"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="VJTemplates_OnSaleHorzCarousel.xml" hash="0aaa9f76b77b4b72af280d598eb21955"/></dir></target><target name="mage"><dir name="js"><dir name="jquery"><file name="jquery-1.6.4.min.js" hash="0bd074f6e49da04536b3ce289e3f7448"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="vjtemplates"><dir name="css"><file name="onsale-horz-carousel.css" hash="42fa8ce56fe62e2bbf1050cf23d8c5ce"/></dir><dir name="images"><file name="next-horizontal.png" hash="fa5bfea6029803d4382e257f3e407269"/><file name="prev-horizontal.png" hash="e9e56e2851122f2c3322e3f36841a66b"/></dir><dir name="js"><file name="onsale-carousel.js" hash="678439bb3993ebf66629e23b59d8c811"/></dir></dir></dir></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-horz-carousel.css RENAMED
File without changes
skin/frontend/{default → base}/default/vjtemplates/images/next-horizontal.png RENAMED
File without changes
skin/frontend/{default → base}/default/vjtemplates/images/prev-horizontal.png RENAMED
File without changes
skin/frontend/{default → base}/default/vjtemplates/js/onsale-carousel.js RENAMED
File without changes