protected function _prepareColumns() { if ($this->_getGroupByColumn() == '2') { $this->addColumn('account_email', array('header' => Mage::helper('affiliateplusstatistic')->__('Account Email'), 'index' => 'account_email', 'type' => 'string', 'sortable' => false, 'totals_label' => Mage::helper('adminhtml')->__('Total'), 'html_decorators' => array('nobr'))); $this->addColumn('visit_at', array('header' => Mage::helper('affiliateplusstatistic')->__('Period'), 'index' => 'visit_at', 'width' => 100, 'sortable' => false, 'period_type' => $this->getPeriodType(), 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date')); $this->addColumn('banner_id', array('header' => Mage::helper('affiliateplusstatistic')->__('Banner'), 'index' => 'banner_id', 'renderer' => 'affiliateplusstatistic/report_renderer_banner', 'totals_label' => '', 'sortable' => false)); } elseif ($this->_getGroupByColumn() == '3') { $this->addColumn('banner_id', array('header' => Mage::helper('affiliateplusstatistic')->__('Banner'), 'index' => 'banner_id', 'renderer' => 'affiliateplusstatistic/report_renderer_banner', 'sortable' => false, 'totals_label' => Mage::helper('adminhtml')->__('Total'), 'html_decorators' => array('nobr'))); $this->addColumn('visit_at', array('header' => Mage::helper('affiliateplusstatistic')->__('Period'), 'index' => 'visit_at', 'width' => 100, 'sortable' => false, 'period_type' => $this->getPeriodType(), 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date')); $this->addColumn('account_email', array('header' => Mage::helper('affiliateplusstatistic')->__('Account Email'), 'index' => 'account_email', 'type' => 'string', 'sortable' => false)); } else { $this->addColumn('visit_at', array('header' => Mage::helper('affiliateplusstatistic')->__('Period'), 'index' => 'visit_at', 'width' => 100, 'sortable' => false, 'period_type' => $this->getPeriodType(), 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date', 'totals_label' => Mage::helper('adminhtml')->__('Total'), 'html_decorators' => array('nobr'))); $this->addColumn('account_email', array('header' => Mage::helper('affiliateplusstatistic')->__('Account Email'), 'index' => 'account_email', 'type' => 'string', 'sortable' => false)); $this->addColumn('banner_id', array('header' => Mage::helper('affiliateplusstatistic')->__('Banner'), 'index' => 'banner_id', 'renderer' => 'affiliateplusstatistic/report_renderer_banner', 'totals_label' => '', 'sortable' => false)); } $this->addColumn('referer', array('header' => Mage::helper('affiliateplusstatistic')->__('Traffic Source'), 'index' => 'referer', 'renderer' => 'affiliateplusstatistic/report_renderer_trafficsource', 'totals_label' => '', 'sortable' => false)); // $this->addColumn('url_path',array( // 'header' => Mage::helper('affiliateplusstatistic')->__('Landing Page'), // 'index' => 'url_path', // 'renderer' => 'affiliateplusstatistic/report_renderer_landingpage', // 'totals_label' => '', // 'sortable' => false // )); $this->addColumn('totals', array('header' => Mage::helper('affiliateplusstatistic')->__('Impressions'), 'index' => 'totals', 'type' => 'number', 'total' => 'sum', 'sortable' => false)); $this->addColumn('is_unique', array('header' => Mage::helper('affiliateplusstatistic')->__('Unique Impressions'), 'index' => 'is_unique', 'type' => 'number', 'total' => 'sum', 'sortable' => false)); Mage::dispatchEvent('affiliateplusstatistic_add_column_impression_report_admin', array('grid' => $this)); $this->addExportType('*/*/exportImpressionsCsv', Mage::helper('adminhtml')->__('CSV')); $this->addExportType('*/*/exportImpressionsExcel', Mage::helper('adminhtml')->__('Excel XML')); return parent::_prepareColumns(); }
protected function _prepareColumns() { $this->addColumn('created_time', array('header' => Mage::helper('affiliateplusstatistic')->__('Period'), 'index' => 'created_time', 'width' => 100, 'sortable' => false, 'period_type' => $this->getPeriodType(), 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date', 'totals_label' => Mage::helper('adminhtml')->__('Total'), 'html_decorators' => array('nobr'))); $this->addColumn('account_name', array('header' => Mage::helper('affiliateplusstatistic')->__('Account Name'), 'index' => 'account_name', 'type' => 'string', 'sortable' => false)); $this->addColumn('account_email', array('header' => Mage::helper('affiliateplusstatistic')->__('Email'), 'index' => 'account_email', 'type' => 'string', 'sortable' => false)); $currencyCode = Mage::app()->getStore()->getBaseCurrencyCode(); $this->addColumn('order_id', array('header' => Mage::helper('affiliateplusstatistic')->__('Number of Orders'), 'index' => 'order_id', 'type' => 'number', 'total' => 'count', 'sortable' => false)); $this->addColumn('total_amount', array('header' => Mage::helper('affiliateplusstatistic')->__('Sales Amount'), 'index' => 'total_amount', 'type' => 'currency', 'currency_code' => $currencyCode, 'total' => 'sum', 'align' => 'right', 'sortable' => false)); $this->addColumn('commission', array('header' => Mage::helper('affiliateplusstatistic')->__('Commission'), 'index' => 'commission', 'type' => 'currency', 'currency_code' => $currencyCode, 'total' => 'sum', 'align' => 'right', 'sortable' => false)); $this->addExportType('*/*/exportAffiliatesCsv', Mage::helper('adminhtml')->__('CSV')); $this->addExportType('*/*/exportAffiliatesExcel', Mage::helper('adminhtml')->__('Excel XML')); return parent::_prepareColumns(); }
protected function _prepareColumns() { $this->addColumn('created_time', array('header' => Mage::helper('affiliateplusstatistic')->__('Period'), 'index' => 'created_time', 'width' => 100, 'sortable' => false, 'period_type' => $this->getPeriodType(), 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date', 'totals_label' => Mage::helper('adminhtml')->__('Total'), 'html_decorators' => array('nobr'))); $this->addColumn('product_name', array('header' => Mage::helper('affiliateplusstatistic')->__('Product Name'), 'index' => 'product_name', 'type' => 'string', 'sortable' => false)); $this->addColumn('product_type', array('header' => Mage::helper('affiliateplus')->__('Type'), 'align' => 'left', 'index' => 'product_type', 'type' => 'options', 'options' => Mage::getSingleton('catalog/product_type')->getOptionArray(), 'sortable' => false)); $this->addColumn('sku', array('header' => Mage::helper('affiliateplusstatistic')->__('SKU'), 'index' => 'sku', 'type' => 'string', 'sortable' => false)); $currencyCode = Mage::app()->getStore()->getBaseCurrencyCode(); $this->addColumn('base_price', array('header' => Mage::helper('affiliateplusstatistic')->__('Price'), 'index' => 'base_price', 'type' => 'currency', 'currency_code' => $currencyCode, 'sortable' => false)); $this->addColumn('qty_ordered', array('header' => Mage::helper('affiliateplusstatistic')->__('Quantity Ordered'), 'index' => 'qty_ordered', 'type' => 'number', 'total' => 'sum', 'sortable' => false)); $this->addColumn('price', array('header' => Mage::helper('affiliateplusstatistic')->__('Total Sales Amount'), 'index' => 'price', 'type' => 'currency', 'currency_code' => $currencyCode, 'total' => 'sum', 'align' => 'right', 'sortable' => false)); $this->addExportType('*/*/exportBestsellersCsv', Mage::helper('adminhtml')->__('CSV')); $this->addExportType('*/*/exportBestsellersExcel', Mage::helper('adminhtml')->__('Excel XML')); return parent::_prepareColumns(); }