当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Adminhtml_Block_Report_Grid_Abstract类代码示例

本文整理汇总了PHP中Mage_Adminhtml_Block_Report_Grid_Abstract的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Report_Grid_Abstract类的具体用法?PHP Mage_Adminhtml_Block_Report_Grid_Abstract怎么用?PHP Mage_Adminhtml_Block_Report_Grid_Abstract使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Mage_Adminhtml_Block_Report_Grid_Abstract类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _addCustomFilter

 /**
  * Add price rule filter
  *
  * @param Mage_Reports_Model_Resource_Report_Collection_Abstract $collection
  * @param Varien_Object $filterData
  * @return Mage_Adminhtml_Block_Report_Grid_Abstract
  */
 protected function _addCustomFilter($collection, $filterData)
 {
     if ($filterData->getPriceRuleType()) {
         $rulesList = $filterData->getData('rules_list');
         if (isset($rulesList[0])) {
             $rulesIds = explode(',', $rulesList[0]);
             $collection->addRuleFilter($rulesIds);
         }
     }
     return parent::_addCustomFilter($filterData, $collection);
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:18,代码来源:Grid.php

示例2: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('period', array('header' => Mage::helper('gorilla_report')->__('Period'), 'index' => 'period', 'width' => 100, 'sortable' => false, 'period_type' => $this->getPeriodType(), 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date', 'totals_label' => Mage::helper('gorilla_report')->__('Total'), 'subtotals_label' => Mage::helper('gorilla_report')->__('Subtotal'), 'html_decorators' => array('nobr')));
     $this->addColumn('increment_id', array('header' => Mage::helper('gorilla_report')->__('Order #'), 'sortable' => false, 'index' => 'increment_id'));
     $this->addColumn('created_at', array('header' => Mage::helper('gorilla_report')->__('Order Date'), 'sortable' => false, 'index' => 'created_at'));
     $this->addColumn('customer_lastname', array('header' => Mage::helper('gorilla_report')->__('Customer Name'), 'sortable' => false, 'index' => 'customer_lastname', 'renderer' => 'gorilla_report/adminhtml_customer_renderer_fullname'));
     $this->addColumn('customer_email', array('header' => Mage::helper('gorilla_report')->__('Customer Email'), 'index' => 'customer_email', 'sortable' => false));
     //Coupon Name
     $this->addColumn('rule_name', array('header' => Mage::helper('gorilla_report')->__('Rule Name'), 'index' => 'rule_name', 'sortable' => false));
     $this->addColumn('coupon_code', array('header' => Mage::helper('gorilla_report')->__('Coupon Code'), 'index' => 'coupon_code', 'sortable' => false));
     $this->addColumn('rule_from_date', array('header' => Mage::helper('gorilla_report')->__('Start Date'), 'index' => 'rule_from_date', 'sortable' => false));
     $this->addColumn('rule_to_date', array('header' => Mage::helper('gorilla_report')->__('Date Expired'), 'index' => 'rule_to_date', 'sortable' => false));
     $this->addColumn('ship_city', array('header' => Mage::helper('gorilla_report')->__('City'), 'index' => 'ship_city', 'sortable' => false));
     $this->addColumn('ship_region', array('header' => Mage::helper('gorilla_report')->__('State'), 'index' => 'ship_region', 'sortable' => false));
     $this->addColumn('ship_zip', array('header' => Mage::helper('gorilla_report')->__('Zip'), 'index' => 'ship_zip', 'sortable' => false));
     $currencyCode = $this->getCurrentCurrencyCode();
     $this->addColumn('order_subtotal', array('header' => Mage::helper('gorilla_report')->__('Order Subtotal'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'order_subtotal', 'sortable' => false));
     $this->addColumn('order_discount', array('header' => Mage::helper('gorilla_report')->__('Order Discount'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'order_discount', 'sortable' => false, 'renderer' => 'gorilla_report/adminhtml_order_renderer_discount'));
     $this->addColumn('order_total', array('header' => Mage::helper('gorilla_report')->__('Order Total'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'order_total', 'sortable' => false));
     $this->addColumn('real_subtotal', array('header' => Mage::helper('gorilla_report')->__('Subtotal'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'real_subtotal', 'sortable' => false));
     $this->addColumn('real_discount', array('header' => Mage::helper('gorilla_report')->__('Discount'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'real_discount', 'sortable' => false, 'renderer' => 'gorilla_report/adminhtml_order_renderer_discount'));
     $this->addColumn('real_total', array('header' => Mage::helper('gorilla_report')->__('Total'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'order_total', 'sortable' => false));
     $this->addExportType('*/*/exportCouponsCsv', Mage::helper('adminhtml')->__('CSV'));
     $this->addExportType('*/*/exportCouponsExcel', Mage::helper('adminhtml')->__('Excel XML'));
     return Mage_Adminhtml_Block_Report_Grid_Abstract::_prepareColumns();
 }
开发者ID:ankita-parashar,项目名称:magento,代码行数:26,代码来源:Gorilla_Report_Block_Sales_Coupons_Grid.php

示例3: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('period', array('header' => Mage::helper('sales')->__('Period'), 'index' => 'period', 'width' => 100, 'sortable' => false, 'period_type' => $this->getPeriodType(), 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date', 'totals_label' => Mage::helper('sales')->__('Total'), 'html_decorators' => array('nobr')));
     $this->addColumn('orders_count', array('header' => Mage::helper('sales')->__('Orders'), 'index' => 'orders_count', 'type' => 'number', 'total' => 'sum', 'sortable' => false));
     $this->addColumn('total_qty_ordered', array('header' => Mage::helper('sales')->__('Sales Items'), 'index' => 'total_qty_ordered', 'type' => 'number', 'total' => 'sum', 'sortable' => false));
     $this->addColumn('total_qty_invoiced', array('header' => Mage::helper('sales')->__('Items'), 'index' => 'total_qty_invoiced', 'type' => 'number', 'total' => 'sum', 'sortable' => false, 'visibility_filter' => array('show_actual_columns')));
     if ($this->getFilterData()->getStoreIds()) {
         $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
     }
     $currencyCode = $this->getCurrentCurrencyCode();
     $rate = $this->getRate($currencyCode);
     $this->addColumn('total_income_amount', array('header' => Mage::helper('sales')->__('Sales Total'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'total_income_amount', 'total' => 'sum', 'sortable' => false, 'rate' => $rate));
     $this->addColumn('total_revenue_amount', array('header' => Mage::helper('sales')->__('Revenue'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'total_revenue_amount', 'total' => 'sum', 'sortable' => false, 'visibility_filter' => array('show_actual_columns'), 'rate' => $rate));
     $this->addColumn('total_profit_amount', array('header' => Mage::helper('sales')->__('Profit'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'total_profit_amount', 'total' => 'sum', 'sortable' => false, 'visibility_filter' => array('show_actual_columns'), 'rate' => $rate));
     $this->addColumn('total_invoiced_amount', array('header' => Mage::helper('sales')->__('Invoiced'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'total_invoiced_amount', 'total' => 'sum', 'sortable' => false, 'rate' => $rate));
     $this->addColumn('total_paid_amount', array('header' => Mage::helper('sales')->__('Paid'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'total_paid_amount', 'total' => 'sum', 'sortable' => false, 'visibility_filter' => array('show_actual_columns'), 'rate' => $rate));
     $this->addColumn('total_refunded_amount', array('header' => Mage::helper('sales')->__('Refunded'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'total_refunded_amount', 'total' => 'sum', 'sortable' => false, 'rate' => $rate));
     $this->addColumn('total_tax_amount', array('header' => Mage::helper('sales')->__('Sales Tax'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'total_tax_amount', 'total' => 'sum', 'sortable' => false, 'rate' => $rate));
     $this->addColumn('total_tax_amount_actual', array('header' => Mage::helper('sales')->__('Tax'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'total_tax_amount_actual', 'total' => 'sum', 'sortable' => false, 'visibility_filter' => array('show_actual_columns'), 'rate' => $rate));
     $this->addColumn('total_shipping_amount', array('header' => Mage::helper('sales')->__('Sales Shipping'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'total_shipping_amount', 'total' => 'sum', 'sortable' => false, 'rate' => $rate));
     $this->addColumn('total_shipping_amount_actual', array('header' => Mage::helper('sales')->__('Shipping'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'total_shipping_amount_actual', 'total' => 'sum', 'sortable' => false, 'visibility_filter' => array('show_actual_columns'), 'rate' => $rate));
     $this->addColumn('total_discount_amount', array('header' => Mage::helper('sales')->__('Sales Discount'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'total_discount_amount', 'total' => 'sum', 'sortable' => false, 'rate' => $rate));
     $this->addColumn('total_discount_amount_actual', array('header' => Mage::helper('sales')->__('Discount'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'total_discount_amount_actual', 'total' => 'sum', 'sortable' => false, 'visibility_filter' => array('show_actual_columns'), 'rate' => $rate));
     $this->addColumn('total_canceled_amount', array('header' => Mage::helper('sales')->__('Canceled'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'total_canceled_amount', 'total' => 'sum', 'sortable' => false, 'rate' => $rate));
     $this->addExportType('*/*/exportSalesCsv', Mage::helper('adminhtml')->__('CSV'));
     $this->addExportType('*/*/exportSalesExcel', Mage::helper('adminhtml')->__('Excel XML'));
     return parent::_prepareColumns();
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:28,代码来源:Grid.php

示例4: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('period', array('header' => Mage::helper('advancedreports')->__('Period'), 'index' => 'period', 'width' => 100, 'sortable' => false, 'period_type' => $this->getPeriodType(), 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date', 'totals_label' => Mage::helper('advancedreports')->__('Total'), 'html_decorators' => array('nobr')));
     $this->addColumn('qty_ordered', array('header' => Mage::helper('advancedreports')->__('Quantity'), 'align' => 'right', 'index' => 'qty_ordered', 'type' => 'number', 'sortable' => false));
     $currencyCode = $this->getCurrentCurrencyCode();
     $this->addColumn('row_total', array('header' => Mage::helper('advancedreports')->__('Total'), 'align' => 'right', 'index' => 'row_total', 'currency_code' => $currencyCode, 'width' => '100px', 'type' => 'currency', 'total' => 'sum', 'sortable' => false));
     $this->addExportType('*/*/exportSalesByProductCsv', Mage::helper('advancedreports')->__('CSV'));
     $this->addExportType('*/*/exportSalesByProductExcel', Mage::helper('advancedreports')->__('Excel XML'));
     return parent::_prepareColumns();
 }
开发者ID:ramantalkin,项目名称:tmp01skin,代码行数:10,代码来源:Grid.php

示例5: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('period', array('header' => Mage::helper('adminhtml')->__('Period'), 'index' => 'period', 'type' => 'string', 'width' => 100, 'sortable' => false, 'totals_label' => Mage::helper('adminhtml')->__('Total'), 'subtotals_label' => Mage::helper('adminhtml')->__('SubTotal')));
     $this->addColumn('shipping_description', array('header' => Mage::helper('adminhtml')->__('Carrier/Method'), 'index' => 'shipping_description', 'sortable' => false));
     $this->addColumn('orders_count', array('header' => Mage::helper('adminhtml')->__('Number of Orders'), 'index' => 'orders_count', 'total' => 'sum', 'type' => 'number', 'width' => 100, 'sortable' => false));
     if ($this->getFilterData()->getStoreIds()) {
         $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
     }
     $this->addColumn('total_shipping', array('header' => Mage::helper('adminhtml')->__('Total Shipping'), 'type' => 'currency', 'currency_code' => $this->getCurrentCurrencyCode(), 'index' => 'total_shipping', 'total' => 'sum', 'sortable' => false));
     $this->addExportType('*/*/exportShippingCsv', Mage::helper('adminhtml')->__('CSV'));
     $this->addExportType('*/*/exportShippingExcel', Mage::helper('adminhtml')->__('Excel'));
     return parent::_prepareColumns();
 }
开发者ID:joebushi,项目名称:magento-mirror,代码行数:13,代码来源:Grid.php

示例6: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('period', array('header' => Mage::helper('sales')->__('Period'), 'index' => 'period', 'width' => '100', 'sortable' => false, 'period_type' => $this->getPeriodType(), 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date', 'totals_label' => Mage::helper('sales')->__('Total'), 'subtotals_label' => Mage::helper('sales')->__('Subtotal'), 'html_decorators' => array('nobr')));
     $this->addColumn('code', array('header' => Mage::helper('sales')->__('Tax'), 'index' => 'code', 'type' => 'string', 'sortable' => false));
     $this->addColumn('percent', array('header' => Mage::helper('sales')->__('Rate'), 'index' => 'percent', 'type' => 'number', 'width' => '100', 'sortable' => false));
     $this->addColumn('orders_count', array('header' => Mage::helper('sales')->__('Number of Orders'), 'index' => 'orders_count', 'total' => 'sum', 'type' => 'number', 'width' => '100', 'sortable' => false));
     if ($this->getFilterData()->getStoreIds()) {
         $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
     }
     $this->addColumn('tax_base_amount_sum', array('header' => Mage::helper('sales')->__('Tax Amount'), 'type' => 'currency', 'currency_code' => $this->getCurrentCurrencyCode(), 'index' => 'tax_base_amount_sum', 'total' => 'sum', 'sortable' => false));
     $this->addExportType('*/*/exportTaxCsv', Mage::helper('adminhtml')->__('CSV'));
     $this->addExportType('*/*/exportTaxExcel', Mage::helper('adminhtml')->__('Excel XML'));
     return parent::_prepareColumns();
 }
开发者ID:votanlean,项目名称:Magento-Pruebas,代码行数:14,代码来源:Grid.php

示例7: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('period', array('header' => Mage::helper('Mage_Sales_Helper_Data')->__('Period'), 'index' => 'period', 'width' => 100, 'sortable' => false, 'period_type' => $this->getPeriodType(), 'renderer' => 'Mage_Adminhtml_Block_Report_Sales_Grid_Column_Renderer_Date', 'totals_label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Total'), 'html_decorators' => array('nobr')));
     $this->addColumn('product_name', array('header' => Mage::helper('Mage_Sales_Helper_Data')->__('Product Name'), 'index' => 'product_name', 'type' => 'string', 'sortable' => false));
     if ($this->getFilterData()->getStoreIds()) {
         $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
     }
     $currencyCode = $this->getCurrentCurrencyCode();
     $this->addColumn('product_price', array('header' => Mage::helper('Mage_Sales_Helper_Data')->__('Price'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'product_price', 'sortable' => false, 'rate' => $this->getRate($currencyCode)));
     $this->addColumn('qty_ordered', array('header' => Mage::helper('Mage_Sales_Helper_Data')->__('Quantity Ordered'), 'index' => 'qty_ordered', 'type' => 'number', 'total' => 'sum', 'sortable' => false));
     $this->addExportType('*/*/exportBestsellersCsv', Mage::helper('Mage_Adminhtml_Helper_Data')->__('CSV'));
     $this->addExportType('*/*/exportBestsellersExcel', Mage::helper('Mage_Adminhtml_Helper_Data')->__('Excel XML'));
     return parent::_prepareColumns();
 }
开发者ID:nemphys,项目名称:magento2,代码行数:14,代码来源:Grid.php

示例8: _prepareColumns

 /**
  * Custom columns preparation
  *
  * @return Mage_Adminhtml_Block_Widget_Grid
  */
 protected function _prepareColumns()
 {
     $this->addColumn('period', array('header' => Mage::helper('adminhtml')->__('Period'), 'index' => 'period', '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('adminhtml')->__('Product Name'), 'index' => 'product_name', 'type' => 'string', 'sortable' => false));
     if ($this->getFilterData()->getStoreIds()) {
         $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
     }
     $currencyCode = $this->getCurrentCurrencyCode();
     $this->addColumn('product_price', array('header' => Mage::helper('adminhtml')->__('Price'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'product_price', 'sortable' => false, 'rate' => $this->getRate($currencyCode)));
     $this->addColumn('views_num', array('header' => Mage::helper('adminhtml')->__('Number of Views'), 'index' => 'views_num', 'type' => 'number', 'total' => 'sum', 'sortable' => false));
     $this->addExportType('*/*/exportViewedCsv', Mage::helper('adminhtml')->__('CSV'));
     $this->addExportType('*/*/exportViewedExcel', Mage::helper('adminhtml')->__('Excel XML'));
     return parent::_prepareColumns();
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:19,代码来源:Grid.php

示例9: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('period', array('header' => Mage::helper('sales')->__('Period'), 'index' => 'period', 'width' => 100, 'sortable' => false, 'period_type' => $this->getPeriodType(), 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date', 'totals_label' => Mage::helper('sales')->__('Total'), 'html_decorators' => array('nobr')));
     $this->addColumn('orders_count', array('header' => Mage::helper('sales')->__('Number of Refunded Orders'), 'index' => 'orders_count', 'type' => 'number', 'total' => 'sum', 'sortable' => false));
     if ($this->getFilterData()->getStoreIds()) {
         $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
     }
     $currencyCode = $this->getCurrentCurrencyCode();
     $this->addColumn('refunded', array('header' => Mage::helper('sales')->__('Total Refunded'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'refunded', 'total' => 'sum', 'sortable' => false));
     $this->addColumn('online_refunded', array('header' => Mage::helper('sales')->__('Online Refunded'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'online_refunded', 'total' => 'sum', 'sortable' => false));
     $this->addColumn('offline_refunded', array('header' => Mage::helper('sales')->__('Offline Refunded'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'offline_refunded', 'total' => 'sum', 'sortable' => false));
     $this->addExportType('*/*/exportRefundedCsv', Mage::helper('adminhtml')->__('CSV'));
     $this->addExportType('*/*/exportRefundedExcel', Mage::helper('adminhtml')->__('Excel'));
     return parent::_prepareColumns();
 }
开发者ID:jpbender,项目名称:mage_virtual,代码行数:15,代码来源:Grid.php

示例10: getFilterData

 protected function getFilterData()
 {
     $date = Mage::getSingleton('core/date');
     $data = parent::getFilterData();
     if (!$data->hasData('from')) {
         $data->setData('from', $date->gmtDate(null, $date->gmtTimestamp() - 30 * 24 * 60 * 60));
     }
     if (!$data->hasData('to')) {
         $data->setData('to', $date->gmtDate(null, $date->gmtTimestamp()));
     }
     if (!$data->hasData('period_type')) {
         $data->setData('period_type', 'day');
     }
     return $data;
 }
开发者ID:santhosh400,项目名称:ecart,代码行数:15,代码来源:Grid.php

示例11: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('period', array('header' => Mage::helper('sales')->__('Period'), 'index' => 'period', 'width' => 100, 'sortable' => false, 'period_type' => $this->getPeriodType(), 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date', 'totals_label' => Mage::helper('sales')->__('Total'), 'subtotals_label' => Mage::helper('sales')->__('Subtotal'), 'html_decorators' => array('nobr')));
     $this->addColumn('shipping_description', array('header' => Mage::helper('sales')->__('Carrier/Method'), 'index' => 'shipping_description', 'sortable' => false));
     $this->addColumn('orders_count', array('header' => Mage::helper('sales')->__('Number of Orders'), 'index' => 'orders_count', 'total' => 'sum', 'type' => 'number', 'width' => 100, 'sortable' => false));
     if ($this->getFilterData()->getStoreIds()) {
         $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
     }
     $currencyCode = $this->getCurrentCurrencyCode();
     $rate = $this->getRate($currencyCode);
     $this->addColumn('total_shipping', array('header' => Mage::helper('sales')->__('Total Sales Shipping'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'total_shipping', 'total' => 'sum', 'sortable' => false, 'rate' => $rate));
     $this->addColumn('total_shipping_actual', array('header' => Mage::helper('sales')->__('Total Shipping'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'total_shipping_actual', 'total' => 'sum', 'sortable' => false, 'rate' => $rate));
     $this->addExportType('*/*/exportShippingCsv', Mage::helper('adminhtml')->__('CSV'));
     $this->addExportType('*/*/exportShippingExcel', Mage::helper('adminhtml')->__('Excel XML'));
     return parent::_prepareColumns();
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:16,代码来源:Grid.php

示例12: _prepareCollection

 /**
  * Preparing collection
  * Filter canceled statuses for orders in taxes
  *
  *@return Mage_Adminhtml_Block_Report_Sales_Tax_Grid
  */
 protected function _prepareCollection()
 {
     $filterData = $this->getFilterData();
     if (!$filterData->hasData('order_statuses')) {
         $orderConfig = Mage::getModel('sales/order_config');
         $statusValues = array();
         $canceledStatuses = $orderConfig->getStateStatuses(Mage_Sales_Model_Order::STATE_CANCELED);
         foreach ($orderConfig->getStatuses() as $code => $label) {
             if (!isset($canceledStatuses[$code])) {
                 $statusValues[] = $code;
             }
         }
         $filterData->setOrderStatuses($statusValues);
     }
     return parent::_prepareCollection();
 }
开发者ID:ravi2jdesign,项目名称:solvingmagento_1.7.0,代码行数:22,代码来源:Grid.php

示例13: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('period', array('header' => Mage::helper('reports')->__('Period'), 'index' => 'period', 'width' => 100, 'sortable' => false, 'period_type' => $this->getPeriodType(), 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date', 'totals_label' => Mage::helper('adminhtml')->__('Total'), 'subtotals_label' => Mage::helper('adminhtml')->__('SubTotal')));
     $this->addColumn('coupon_code', array('header' => Mage::helper('reports')->__('Coupon Code'), 'sortable' => false, 'index' => 'coupon_code'));
     $this->addColumn('coupon_uses', array('header' => Mage::helper('reports')->__('Number of Use'), 'sortable' => false, 'index' => 'coupon_uses', 'total' => 'sum', 'type' => 'number'));
     if ($this->getFilterData()->getStoreIds()) {
         $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
     }
     $currency_code = $this->getCurrentCurrencyCode();
     $this->addColumn('subtotal_amount', array('header' => Mage::helper('reports')->__('Subtotal Amount'), 'sortable' => false, 'type' => 'currency', 'currency_code' => $currency_code, 'total' => 'sum', 'index' => 'subtotal_amount'));
     $this->addColumn('discount_amount', array('header' => Mage::helper('reports')->__('Discount Amount'), 'sortable' => false, 'type' => 'currency', 'currency_code' => $currency_code, 'total' => 'sum', 'index' => 'discount_amount'));
     $this->addColumn('total_amount', array('header' => Mage::helper('reports')->__('Total Amount'), 'sortable' => false, 'type' => 'currency', 'currency_code' => $currency_code, 'total' => 'sum', 'index' => 'total_amount'));
     $this->addExportType('*/*/exportCouponsCsv', Mage::helper('reports')->__('CSV'));
     $this->addExportType('*/*/exportCouponsExcel', Mage::helper('reports')->__('Excel'));
     return parent::_prepareColumns();
 }
开发者ID:hunnybohara,项目名称:magento-chinese-localization,代码行数:16,代码来源:Grid.php

示例14: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('period', array('header' => Mage::helper('Mage_Sales_Helper_Data')->__('Period'), 'index' => 'period', 'width' => 100, 'sortable' => false, 'period_type' => $this->getPeriodType(), 'renderer' => 'Mage_Adminhtml_Block_Report_Sales_Grid_Column_Renderer_Date', 'totals_label' => Mage::helper('Mage_Sales_Helper_Data')->__('Total'), 'html_decorators' => array('nobr')));
     $this->addColumn('orders_count', array('header' => Mage::helper('Mage_Sales_Helper_Data')->__('Number of Orders'), 'index' => 'orders_count', 'type' => 'number', 'total' => 'sum', 'sortable' => false));
     $this->addColumn('orders_invoiced', array('header' => Mage::helper('Mage_Sales_Helper_Data')->__('Number of Invoiced Orders'), 'index' => 'orders_invoiced', 'type' => 'number', 'total' => 'sum', 'sortable' => false));
     if ($this->getFilterData()->getStoreIds()) {
         $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
     }
     $currencyCode = $this->getCurrentCurrencyCode();
     $rate = $this->getRate($currencyCode);
     $this->addColumn('invoiced', array('header' => Mage::helper('Mage_Sales_Helper_Data')->__('Total Invoiced'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'invoiced', 'total' => 'sum', 'sortable' => false, 'rate' => $rate));
     $this->addColumn('invoiced_captured', array('header' => Mage::helper('Mage_Sales_Helper_Data')->__('Total Invoiced Paid'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'invoiced_captured', 'total' => 'sum', 'sortable' => false, 'rate' => $rate));
     $this->addColumn('invoiced_not_captured', array('header' => Mage::helper('Mage_Sales_Helper_Data')->__('Total Invoiced not Paid'), 'type' => 'currency', 'currency_code' => $currencyCode, 'index' => 'invoiced_not_captured', 'total' => 'sum', 'sortable' => false, 'rate' => $rate));
     $this->addExportType('*/*/exportInvoicedCsv', Mage::helper('Mage_Adminhtml_Helper_Data')->__('CSV'));
     $this->addExportType('*/*/exportInvoicedExcel', Mage::helper('Mage_Adminhtml_Helper_Data')->__('Excel XML'));
     return parent::_prepareColumns();
 }
开发者ID:relue,项目名称:magento2,代码行数:17,代码来源:Grid.php

示例15: _prepareCollection

 protected function _prepareCollection()
 {
     $filterData = $this->getFilterData();
     if ($filterData->getData('from') == null || $filterData->getData('to') == null) {
         $this->setCountTotals(false);
         $this->setCountSubTotals(false);
         return parent::_prepareCollection();
     }
     $storeIds = $this->_getStoreIds();
     $orderStatuses = $filterData->getData('order_statuses');
     if (is_array($orderStatuses)) {
         if (count($orderStatuses) == 1 && strpos($orderStatuses[0], ',') !== false) {
             $filterData->setData('order_statuses', explode(',', $orderStatuses[0]));
         }
     }
     $vendorIds = $this->_getVendorIds();
     //print_r($vendorIds);
     $resourceCollection = Mage::getResourceModel($this->getResourceCollectionName())->setPeriod($filterData->getData('period_type'))->setDateRange($filterData->getData('from', null), $filterData->getData('to', null))->addStoreFilter($storeIds)->addVendorFilter($vendorIds)->addOrderStatusFilter($filterData->getData('order_statuses'))->setAggregatedColumns($this->_getAggregatedColumns());
     if ($this->_isExport) {
         $this->setCollection($resourceCollection);
         return $this;
     }
     if ($filterData->getData('show_empty_rows', false)) {
         Mage::helper('reports')->prepareIntervalsCollection($this->getCollection(), $filterData->getData('from', null), $filterData->getData('to', null), $filterData->getData('period_type'));
     }
     if ($this->getCountSubTotals()) {
         $this->getSubTotals();
     }
     if ($this->getCountTotals()) {
         $totalsCollection = Mage::getResourceModel($this->getResourceCollectionName())->setPeriod($filterData->getData('period_type'))->setDateRange($filterData->getData('from', null), $filterData->getData('to', null))->addStoreFilter($storeIds)->addVendorFilter($vendorIds)->addOrderStatusFilter($filterData->getData('order_statuses'))->setAggregatedColumns($this->_getAggregatedColumns())->isTotals(true);
         foreach ($totalsCollection as $item) {
             $this->setTotals($item);
             break;
         }
     }
     $this->getCollection()->setColumnGroupBy($this->_columnGroupBy);
     $this->getCollection()->setResourceCollection($resourceCollection);
     //$grandParent = $this->getGrandParent();
     return $this;
 }
开发者ID:shashankkanungo,项目名称:magento,代码行数:40,代码来源:SM_Vendors_Block_Adminhtml_Reports_VendorOrders_Grid.php


注:本文中的Mage_Adminhtml_Block_Report_Grid_Abstract类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。