Mage_Catalog_Block_Product_List_Related Class Reference

Inheritance diagram for Mage_Catalog_Block_Product_List_Related:

Mage_Catalog_Block_Product_Abstract Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getItems ()

Protected Member Functions

 _prepareData ()
 _beforeToHtml ()

Protected Attributes

 $_itemCollection


Detailed Description

Definition at line 35 of file Related.php.


Member Function Documentation

_beforeToHtml (  )  [protected]

Before rendering html, but after trying to load cache

Returns:
Mage_Core_Block_Abstract

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 (  ) 

Definition at line 72 of file Related.php.

00073     {
00074         return $this->_itemCollection;
00075     }


Member Data Documentation

$_itemCollection [protected]

Definition at line 37 of file Related.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:36 2009 for Magento by  doxygen 1.5.8