Public Member Functions | |
__construct () | |
Protected Member Functions | |
_prepareCollection () | |
_prepareColumns () |
Definition at line 34 of file Grid.php.
__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('gridViewedProducts'); 00041 }
_prepareCollection | ( | ) | [protected] |
Prepare grid collection object
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_viewed_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 'total' =>Mage::helper('reports')->__('Subtotal') 00055 )); 00056 00057 $this->addColumn('price', array( 00058 'header' =>Mage::helper('reports')->__('Price'), 00059 'width' =>'120px', 00060 'type' =>'currency', 00061 'currency_code' => $this->getCurrentCurrencyCode(), 00062 'index' =>'price' 00063 )); 00064 00065 $this->addColumn('views', array( 00066 'header' =>Mage::helper('reports')->__('Number of Views'), 00067 'width' =>'120px', 00068 'align' =>'right', 00069 'index' =>'views', 00070 'total' =>'sum' 00071 )); 00072 00073 $this->addExportType('*/*/exportViewedCsv', Mage::helper('reports')->__('CSV')); 00074 $this->addExportType('*/*/exportViewedExcel', Mage::helper('reports')->__('Excel')); 00075 00076 return parent::_prepareColumns(); 00077 }