Public Member Functions | |
getItems () | |
Protected Member Functions | |
_prepareData () | |
_beforeToHtml () | |
Protected Attributes | |
$_itemCollection |
Definition at line 35 of file Related.php.
_beforeToHtml | ( | ) | [protected] |
Before rendering html, but after trying to load cache
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 66 of file Related.php.
00067 { 00068 $this->_prepareData(); 00069 return parent::_beforeToHtml(); 00070 }
_prepareData | ( | ) | [protected] |
Definition at line 39 of file Related.php.
00040 { 00041 $product = Mage::registry('product'); 00042 /* @var $product Mage_Catalog_Model_Product */ 00043 00044 $this->_itemCollection = $product->getRelatedProductCollection() 00045 ->addAttributeToSelect('required_options') 00046 ->addAttributeToSort('position', 'asc') 00047 ->addStoreFilter() 00048 ; 00049 Mage::getResourceSingleton('checkout/cart')->addExcludeProductFilter($this->_itemCollection, 00050 Mage::getSingleton('checkout/session')->getQuoteId() 00051 ); 00052 $this->_addProductAttributesAndPrices($this->_itemCollection); 00053 00054 // Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_itemCollection); 00055 Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($this->_itemCollection); 00056 00057 $this->_itemCollection->load(); 00058 00059 foreach ($this->_itemCollection as $product) { 00060 $product->setDoNotUseCategoryId(true); 00061 } 00062 00063 return $this; 00064 }
getItems | ( | ) |
$_itemCollection [protected] |
Definition at line 37 of file Related.php.