Created
September 9, 2010 22:11
-
-
Save ho-nl/572695 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dateToday = date('m/d/y'); | |
$tomorrow = mktime(0, 0, 0, date('m'), date('d')+1, date('y')); | |
$dateTomorrow = date('m/d/y', $tomorrow); | |
$this->_productCollection | |
->addAttributeToFilter('special_from_date', array('date' => true, 'to' => $dateToday)) | |
->addAttributeToFilter('special_to_date', array('or'=> array( | |
0 => array('date' => true, 'from' => $dateTomorrow), | |
1 => array('is' => new Zend_Db_Expr('null'))) | |
), 'left'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->_productCollection | |
->addAttributeToFilter('special_from_date', array('date' => true, 'to' => $dateToday)) | |
->addAttributeToFilter('special_to_date', array('date' => true, 'from' => $dateTomorrow)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->_productCollection = $layer->getProductCollection(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<reference name="content"> | |
<block type="catalog/product_featured" name="product.featured" template="catalog/product/featured.phtml"> | |
<action method="setCategoryId"><categoryid>300</categoryid></action> | |
<block type="catalog/product_list_toolbar" name="product_featured_toolbar" template="catalog/product/list/toolbar.phtml"> | |
<action method="addPagerLimit"><mode>list</mode><limit>5</limit></action> | |
</block> | |
<action method="setToolbarBlockName"><name>product_featured_toolbar</name></action> | |
</block> | |
</reference> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Mage_Catalog_Block_Product_List extends Mage_Catalog_Block_Product_Abstract |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<reference name="content"> | |
<block type="catalog/product_specials" name="product_list" template="catalog/product/list.phtml"> | |
<action method="setCategoryId"><categoryid>2</categoryid></action> | |
<action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action> | |
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action> | |
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml"> | |
<block type="page/html_pager" name="product_list_toolbar_pager"> | |
</block> | |
</block> | |
</block></reference> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Mage_Catalog_Block_Product_Specials extends Mage_Catalog_Block_Product_Abstract |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment