Mage_Catalog_Block_Product_List_Crosssell Class Reference

Inheritance diagram for Mage_Catalog_Block_Product_List_Crosssell:

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 36 of file Crosssell.php.


Member Function Documentation

_beforeToHtml (  )  [protected]

Before rendering html process Prepare items collection

Returns:
Mage_Catalog_Block_Product_List_Crosssell

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 78 of file Crosssell.php.

00079     {
00080         $this->_prepareData();
00081         return parent::_beforeToHtml();
00082     }

_prepareData (  )  [protected]

Prepare crosssell items data

Returns:
Mage_Catalog_Block_Product_List_Crosssell

Definition at line 50 of file Crosssell.php.

00051     {
00052         $product = Mage::registry('product');
00053         /* @var $product Mage_Catalog_Model_Product */
00054 
00055         $this->_itemCollection = $product->getCrossSellProductCollection()
00056             ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
00057             ->addAttributeToSort('position', 'asc')
00058             ->addStoreFilter();
00059 
00060 //        Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_itemCollection);
00061         Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($this->_itemCollection);
00062 
00063         $this->_itemCollection->load();
00064 
00065         foreach ($this->_itemCollection as $product) {
00066             $product->setDoNotUseCategoryId(true);
00067         }
00068 
00069         return $this;
00070     }

getItems (  ) 

Retrieve crosssell items collection

Returns:
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Link_Product_Collection

Definition at line 89 of file Crosssell.php.

00090     {
00091         return $this->_itemCollection;
00092     }


Member Data Documentation

$_itemCollection [protected]

Definition at line 43 of file Crosssell.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