Mage_Adminhtml_Block_Report_Shopcart_Customer_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Report_Shopcart_Customer_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 ()
 _afterLoadCollection ()
 _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 Varien_Object.

Definition at line 37 of file Grid.php.

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


Member Function Documentation

_afterLoadCollection (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 54 of file Grid.php.

00055     {
00056         $this->getCollection()->addCartInfo();
00057     }

_prepareCollection (  )  [protected]

Prepare grid collection object

Returns:
this

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 43 of file Grid.php.

00044     {
00045         //TODO: add full name logic
00046         $collection = Mage::getResourceModel('reports/customer_collection')
00047           ->addAttributeToSelect('firstname')
00048           ->addAttributeToSelect('lastname');
00049 
00050         $this->setCollection($collection);
00051         return parent::_prepareCollection();
00052     }

_prepareColumns (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 59 of file Grid.php.

00060     {
00061         $this->addColumn('entity_id', array(
00062             'header'    =>Mage::helper('reports')->__('ID'),
00063             'width'     =>'50px',
00064             'align'     =>'right',
00065             'index'     =>'entity_id'
00066         ));
00067 
00068         $this->addColumn('firstname', array(
00069             'header'    =>Mage::helper('reports')->__('First Name'),
00070             'index'     =>'firstname'
00071         ));
00072 
00073         $this->addColumn('lastname', array(
00074             'header'    =>Mage::helper('reports')->__('Last Name'),
00075             'index'     =>'lastname'
00076         ));
00077 
00078         $this->addColumn('items', array(
00079             'header'    =>Mage::helper('reports')->__('Items in Cart'),
00080             'width'     =>'70px',
00081             'sortable'  =>false,
00082             'align'     =>'right',
00083             'index'     =>'items'
00084         ));
00085 
00086         $this->addColumn('total', array(
00087             'header'    =>Mage::helper('reports')->__('Total'),
00088             'width'     =>'70px',
00089             'sortable'  =>false,
00090             'type'      =>'currency',
00091             'align'     =>'right',
00092             'currency_code' => $this->getCurrentCurrencyCode(),
00093             'index'     =>'total',
00094             'renderer'  =>'adminhtml/report_grid_column_renderer_currency'
00095         ));
00096 
00097         $this->setFilterVisibility(false);
00098 
00099         $this->addExportType('*/*/exportCustomerCsv', Mage::helper('reports')->__('CSV'));
00100         $this->addExportType('*/*/exportCustomerExcel', Mage::helper('reports')->__('Excel'));
00101 
00102         return parent::_prepareColumns();
00103     }


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

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