Mage_Adminhtml_Report_ProductController Class Reference

Inheritance diagram for Mage_Adminhtml_Report_ProductController:

Mage_Adminhtml_Controller_Action Mage_Core_Controller_Varien_Action

List of all members.

Public Member Functions

 _initAction ()
 orderedAction ()
 exportOrderedCsvAction ()
 exportOrderedExcelAction ()
 soldAction ()
 exportSoldCsvAction ()
 exportSoldExcelAction ()
 viewedAction ()
 exportViewedCsvAction ()
 exportViewedExcelAction ()
 lowstockAction ()
 exportLowstockCsvAction ()
 exportLowstockExcelAction ()
 downloadsAction ()
 exportDownloadsCsvAction ()
 exportDownloadsExcelAction ()

Protected Member Functions

 _isAllowed ()


Detailed Description

Definition at line 35 of file ProductController.php.


Member Function Documentation

_initAction (  ) 

init

Returns:
Mage_Adminhtml_Report_ProductController

Definition at line 42 of file ProductController.php.

00043     {
00044         $act = $this->getRequest()->getActionName();
00045         if(!$act)
00046             $act = 'default';
00047         $this->loadLayout()
00048             ->_addBreadcrumb(Mage::helper('reports')->__('Reports'), Mage::helper('reports')->__('Reports'))
00049             ->_addBreadcrumb(Mage::helper('reports')->__('Products'), Mage::helper('reports')->__('Products'));
00050         return $this;
00051     }

_isAllowed (  )  [protected]

Check is allowed for report

Returns:
bool

Reimplemented from Mage_Adminhtml_Controller_Action.

Definition at line 259 of file ProductController.php.

00260     {
00261         switch ($this->getRequest()->getActionName()) {
00262             case 'ordered':
00263                 return Mage::getSingleton('admin/session')->isAllowed('report/products/ordered');
00264                 break;
00265             case 'viewed':
00266                 return Mage::getSingleton('admin/session')->isAllowed('report/products/viewed');
00267                 break;
00268             case 'sold':
00269                 return Mage::getSingleton('admin/session')->isAllowed('report/products/sold');
00270                 break;
00271             case 'lowstock':
00272                 return Mage::getSingleton('admin/session')->isAllowed('report/products/lowstock');
00273                 break;
00274             default:
00275                 return Mage::getSingleton('admin/session')->isAllowed('report/products');
00276                 break;
00277         }
00278     }

downloadsAction (  ) 

Downloads action

Definition at line 217 of file ProductController.php.

00218     {
00219         $this->_initAction()
00220             ->_setActiveMenu('report/product/downloads')
00221             ->_addBreadcrumb(Mage::helper('reports')->__('Downloads'), Mage::helper('reports')->__('Downloads'))
00222             ->_addContent($this->getLayout()->createBlock('adminhtml/report_product_downloads'))
00223             ->renderLayout();
00224     }

exportDownloadsCsvAction (  ) 

Export products downloads report to CSV format

Definition at line 230 of file ProductController.php.

00231     {
00232         $fileName   = 'products_downloads.csv';
00233         $content    = $this->getLayout()->createBlock('adminhtml/report_product_downloads_grid')
00234             ->setSaveParametersInSession(true)
00235             ->getCsv();
00236 
00237         $this->_prepareDownloadResponse($fileName, $content);
00238     }

exportDownloadsExcelAction (  ) 

Export products downloads report to XLS format

Definition at line 244 of file ProductController.php.

00245     {
00246         $fileName   = 'products_downloads.xml';
00247         $content    = $this->getLayout()->createBlock('adminhtml/report_product_downloads_grid')
00248             ->setSaveParametersInSession(true)
00249             ->getExcel($fileName);
00250 
00251         $this->_prepareDownloadResponse($fileName, $content);
00252     }

exportLowstockCsvAction (  ) 

Export low stock products report to CSV format

Definition at line 189 of file ProductController.php.

00190     {
00191         $fileName   = 'products_lowstock.csv';
00192         $content    = $this->getLayout()->createBlock('adminhtml/report_product_lowstock_grid')
00193             ->setSaveParametersInSession(true)
00194             ->getCsv();
00195 
00196         $this->_prepareDownloadResponse($fileName, $content);
00197     }

exportLowstockExcelAction (  ) 

Export low stock products report to XML format

Definition at line 203 of file ProductController.php.

00204     {
00205         $fileName   = 'products_lowstock.xml';
00206         $content    = $this->getLayout()->createBlock('adminhtml/report_product_lowstock_grid')
00207             ->setSaveParametersInSession(true)
00208             ->getExcel($fileName);
00209 
00210         $this->_prepareDownloadResponse($fileName, $content);
00211     }

exportOrderedCsvAction (  ) 

Export products bestsellers report to CSV format

Definition at line 70 of file ProductController.php.

00071     {
00072         $fileName   = 'products_bestsellers.csv';
00073         $content    = $this->getLayout()->createBlock('adminhtml/report_product_ordered_grid')
00074             ->getCsv();
00075 
00076         $this->_prepareDownloadResponse($fileName, $content);
00077     }

exportOrderedExcelAction (  ) 

Export products bestsellers report to XML format

Definition at line 83 of file ProductController.php.

00084     {
00085         $fileName   = 'products_bestsellers.xml';
00086         $content    = $this->getLayout()->createBlock('adminhtml/report_product_ordered_grid')
00087             ->getExcel($fileName);
00088 
00089         $this->_prepareDownloadResponse($fileName, $content);
00090     }

exportSoldCsvAction (  ) 

Export Sold Products report to CSV format action

Definition at line 109 of file ProductController.php.

00110     {
00111         $fileName   = 'products_ordered.csv';
00112         $content    = $this->getLayout()
00113             ->createBlock('adminhtml/report_product_sold_grid')
00114             ->getCsv();
00115 
00116         $this->_prepareDownloadResponse($fileName, $content);
00117     }

exportSoldExcelAction (  ) 

Export Sold Products report to XML format action

Definition at line 123 of file ProductController.php.

00124     {
00125         $fileName   = 'products_ordered.xml';
00126         $content    = $this->getLayout()
00127             ->createBlock('adminhtml/report_product_sold_grid')
00128             ->getExcel($fileName);
00129 
00130         $this->_prepareDownloadResponse($fileName, $content);
00131     }

exportViewedCsvAction (  ) 

Export products most viewed report to CSV format

Definition at line 150 of file ProductController.php.

00151     {
00152         $fileName   = 'products_mostviewed.csv';
00153         $content    = $this->getLayout()->createBlock('adminhtml/report_product_viewed_grid')
00154             ->getCsv();
00155 
00156         $this->_prepareDownloadResponse($fileName, $content);
00157     }

exportViewedExcelAction (  ) 

Export products most viewed report to XML format

Definition at line 163 of file ProductController.php.

00164     {
00165         $fileName   = 'products_mostviewed.xml';
00166         $content    = $this->getLayout()->createBlock('adminhtml/report_product_viewed_grid')
00167             ->getExcel($fileName);
00168 
00169         $this->_prepareDownloadResponse($fileName, $content);
00170     }

lowstockAction (  ) 

Low stock action

Definition at line 176 of file ProductController.php.

00177     {
00178         $this->_initAction()
00179             ->_setActiveMenu('report/product/lowstock')
00180             ->_addBreadcrumb(Mage::helper('reports')->__('Low stock'), Mage::helper('reports')->__('Low stock'))
00181             ->_addContent($this->getLayout()->createBlock('adminhtml/report_product_lowstock'))
00182             ->renderLayout();
00183     }

orderedAction (  ) 

Bestsellers

Definition at line 57 of file ProductController.php.

00058     {
00059         $this->_initAction()
00060             ->_setActiveMenu('report/product/ordered')
00061             ->_addBreadcrumb(Mage::helper('reports')->__('Bestsellers'), Mage::helper('reports')->__('Bestsellers'))
00062             ->_addContent($this->getLayout()->createBlock('adminhtml/report_product_ordered'))
00063             ->renderLayout();
00064     }

soldAction (  ) 

Sold Products Report Action

Definition at line 96 of file ProductController.php.

00097     {
00098         $this->_initAction()
00099             ->_setActiveMenu('report/product/sold')
00100             ->_addBreadcrumb(Mage::helper('reports')->__('Products Ordered'), Mage::helper('reports')->__('Products Ordered'))
00101             ->_addContent($this->getLayout()->createBlock('adminhtml/report_product_sold'))
00102             ->renderLayout();
00103     }

viewedAction (  ) 

Most viewed products

Definition at line 137 of file ProductController.php.

00138     {
00139         $this->_initAction()
00140             ->_setActiveMenu('report/product/viewed')
00141             ->_addBreadcrumb(Mage::helper('reports')->__('Most viewed'), Mage::helper('reports')->__('Most viewed'))
00142             ->_addContent($this->getLayout()->createBlock('adminhtml/report_product_viewed'))
00143             ->renderLayout();
00144     }


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

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