Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Compared Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Compared:

Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Abstract Mage_Adminhtml_Block_Sales_Order_Create_Abstract Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getHeaderText ()
 getItemCollection ()
 getItemId ($item)


Detailed Description

Definition at line 35 of file Compared.php.


Constructor & Destructor Documentation

__construct (  ) 

Constructor

By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes

Reimplemented from Varien_Object.

Definition at line 38 of file Compared.php.

00039     {
00040         parent::__construct();
00041         $this->setId('sales_order_create_sidebar_compared');
00042         $this->setDataId('compared');
00043     }


Member Function Documentation

getHeaderText (  ) 

Definition at line 45 of file Compared.php.

00046     {
00047         return Mage::helper('sales')->__('Products in Compare List');
00048     }

getItemCollection (  ) 

Retrieve item collection

Returns:
mixed

Reimplemented from Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Abstract.

Definition at line 55 of file Compared.php.

00056     {
00057         $collection = $this->getData('item_collection');
00058         if (is_null($collection)) {
00059             if ($collection = $this->getCreateOrderModel()->getCustomerCompareList()) {
00060                 $collection = $collection->getItemCollection()
00061                     ->useProductItem(true)
00062                     ->setStoreId($this->getQuote()->getStoreId())
00063                     ->addStoreFilter($this->getQuote()->getStoreId())
00064                     ->setCustomerId($this->getCustomerId())
00065                     ->addAttributeToSelect('name')
00066                     ->addAttributeToSelect('price')
00067                     ->addAttributeToSelect('image')
00068                     ->addAttributeToSelect('status')
00069                     ->load();
00070             }
00071             $this->setData('item_collection', $collection);
00072         }
00073         return $collection;
00074     }

getItemId ( item  ) 

Retrieve item identifier of block item

Parameters:
mixed $item
Returns:
int

Reimplemented from Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Abstract.

Definition at line 76 of file Compared.php.

00077     {
00078         return $item->getCatalogCompareItemId();
00079     }


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

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