Mage_Adminhtml_Block_Report_Product_Ordered_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Report_Product_Ordered_Grid:

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

Protected Member Functions

 _prepareCollection ()
 _prepareColumns ()


Detailed Description

Definition at line 34 of file Grid.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 Mage_Adminhtml_Block_Report_Grid.

Definition at line 37 of file Grid.php.

00038     {
00039         parent::__construct();
00040         $this->setId('gridOrderedProducts');
00041     }


Member Function Documentation

_prepareCollection (  )  [protected]

Prepare grid collection object

Returns:
this

Validate from and to date

Getting and saving store ids for website & group

Reimplemented from Mage_Adminhtml_Block_Report_Grid.

Definition at line 43 of file Grid.php.

00044     {
00045         parent::_prepareCollection();
00046         $this->getCollection()->initReport('reports/product_ordered_collection');
00047     }

_prepareColumns (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Report_Grid.

Definition at line 49 of file Grid.php.

00050     {
00051         $this->addColumn('name', array(
00052             'header'    =>Mage::helper('reports')->__('Product Name'),
00053             'index'     =>'name'
00054         ));
00055 
00056         $this->addColumn('price', array(
00057             'header'    =>Mage::helper('reports')->__('Price'),
00058             'width'     =>'120px',
00059             'type'      =>'currency',
00060             'currency_code' => $this->getCurrentCurrencyCode(),
00061             'index'     =>'price'
00062         ));
00063 
00064         $this->addColumn('ordered_qty', array(
00065             'header'    =>Mage::helper('reports')->__('Quantity Ordered'),
00066             'width'     =>'120px',
00067             'align'     =>'right',
00068             'index'     =>'ordered_qty',
00069             'total'     =>'sum',
00070             'type'      =>'number'
00071         ));
00072 
00073         $this->addExportType('*/*/exportOrderedCsv', Mage::helper('reports')->__('CSV'));
00074         $this->addExportType('*/*/exportOrderedExcel', Mage::helper('reports')->__('Excel'));
00075 
00076         return parent::_prepareColumns();
00077     }


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

Generated on Sat Jul 4 17:22:55 2009 for Magento by  doxygen 1.5.8