• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Mage_Adminhtml_Block_Widget_Grid类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: countTotals

 /**
  * Retrieve count totals
  *
  * @param Mage_Adminhtml_Block_Widget_Grid $grid
  * @param string $from
  * @param string $to
  * @return Varien_Object
  */
 public function countTotals($grid, $from, $to)
 {
     $columns = array();
     foreach ($grid->getColumns() as $col) {
         $columns[$col->getIndex()] = array("total" => $col->getTotal(), "value" => 0);
     }
     $count = 0;
     $report = $grid->getCollection()->getReportFull($from, $to);
     foreach ($report as $item) {
         if ($grid->getSubReportSize() && $count >= $grid->getSubReportSize()) {
             continue;
         }
         $data = $item->getData();
         foreach ($columns as $field => $a) {
             if ($field !== '') {
                 $columns[$field]['value'] = $columns[$field]['value'] + (isset($data[$field]) ? $data[$field] : 0);
             }
         }
         $count++;
     }
     $data = array();
     foreach ($columns as $field => $a) {
         if ($a['total'] == 'avg') {
             if ($field !== '') {
                 if ($count != 0) {
                     $data[$field] = $a['value'] / $count;
                 } else {
                     $data[$field] = 0;
                 }
             }
         } else {
             if ($a['total'] == 'sum') {
                 if ($field !== '') {
                     $data[$field] = $a['value'];
                 }
             } else {
                 if (strpos($a['total'], '/') !== FALSE) {
                     if ($field !== '') {
                         $data[$field] = 0;
                     }
                 }
             }
         }
     }
     $totals = new Varien_Object();
     $totals->setData($data);
     return $totals;
 }
开发者ID:natxetee,项目名称:magento2,代码行数:56,代码来源:Totals.php


示例2: _prepareCollection

 /**
  * Prepare related orders collection
  *
  * @return Mage_Adminhtml_Block_Widget_Grid
  */
 protected function _prepareCollection()
 {
     $collection = Mage::getResourceModel('Mage_Sales_Model_Resource_Order_Grid_Collection');
     $collection->addBillingAgreementsFilter(Mage::registry('current_billing_agreement')->getId());
     $this->setCollection($collection);
     return Mage_Adminhtml_Block_Widget_Grid::_prepareCollection();
 }
开发者ID:nemphys,项目名称:magento2,代码行数:12,代码来源:Orders.php


示例3: _prepareCollection

 protected function _prepareCollection()
 {
     $store = $this->_getStore();
     $collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('sku')->addAttributeToSelect('name')->addAttributeToSelect('attribute_set_id')->addAttributeToSelect('type_id');
     if (Mage::helper('catalog')->isModuleEnabled('Mage_CatalogInventory')) {
         $collection->joinField('qty', 'cataloginventory/stock_item', 'qty', 'product_id=entity_id', '{{table}}.stock_id=1', 'left');
     }
     if ($store->getId()) {
         $adminStore = Mage_Core_Model_App::ADMIN_STORE_ID;
         $collection->addStoreFilter($store);
         $collection->joinAttribute('name', 'catalog_product/name', 'entity_id', null, 'inner', $adminStore);
         $collection->joinAttribute('custom_name', 'catalog_product/name', 'entity_id', null, 'inner', $store->getId());
         $collection->joinAttribute('status', 'catalog_product/status', 'entity_id', null, 'inner', $store->getId());
         $collection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', null, 'inner', $store->getId());
         $collection->joinAttribute('price', 'catalog_product/price', 'entity_id', null, 'left', $store->getId());
     } else {
         $collection->addAttributeToSelect('price');
         $collection->joinAttribute('status', 'catalog_product/status', 'entity_id', null, 'inner');
         $collection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', null, 'inner');
     }
     $collection->joinAttribute('seller_id', 'catalog_product/seller_id', 'entity_id', null, 'left');
     $this->setCollection($collection);
     Mage_Adminhtml_Block_Widget_Grid::_prepareCollection();
     $this->getCollection()->addWebsiteNamesToResult();
     return $this;
 }
开发者ID:DeveshKumarThakur,项目名称:cosmetics,代码行数:26,代码来源:Grid.php


示例4: _prepareCollection

 protected function _prepareCollection()
 {
     $role = Mage::getSingleton('aitpermissions/role');
     $collection = Mage::getResourceModel('reports/quote_collection');
     if (version_compare(Mage::getVersion(), '1.6.0.0', '<')) {
         $collection->prepareForProductsInCarts()->setSelectCountSqlType(Mage_Reports_Model_Mysql4_Quote_Collection::SELECT_COUNT_SQL_TYPE_CART);
     } else {
         $collection->prepareForProductsInCarts()->setSelectCountSqlType(Mage_Reports_Model_Resource_Quote_Collection::SELECT_COUNT_SQL_TYPE_CART);
     }
     if ($role->isPermissionsEnabled()) {
         if (!Mage::helper('aitpermissions')->isShowingAllProducts()) {
             if ($role->isScopeStore()) {
                 $collection->getSelect()->joinLeft(array('product_cat' => Mage::getSingleton('core/resource')->getTableName('catalog_category_product')), 'product_cat.product_id = e.entity_id', array());
                 $collection->getSelect()->where(' product_cat.category_id in (' . join(',', $role->getAllowedCategoryIds()) . ')
                     or product_cat.category_id IS NULL ');
                 $collection->getSelect()->distinct(true);
             }
             if ($role->isScopeWebsite()) {
                 $collection->addStoreFilter($role->getAllowedStoreviewIds());
             }
         }
     }
     $this->setCollection($collection);
     return Mage_Adminhtml_Block_Widget_Grid::_prepareCollection();
 }
开发者ID:finelinePG,项目名称:finelink-dev,代码行数:25,代码来源:AdminReportShopcartProductGrid.php


示例5: _prepareColumns

 /**
  * @throws Exception
  */
 protected function _prepareColumns()
 {
     $this->addColumn('variable_id', array('header' => Mage::helper('adminhtml')->__('ID'), 'width' => 5, 'align' => 'right', 'sortable' => true, 'index' => 'variable_id'));
     $this->addColumn('variable_name', array('header' => Mage::helper('adminhtml')->__('Variable'), 'index' => 'variable_name'));
     $this->addColumn('is_allowed', array('header' => Mage::helper('adminhtml')->__('Status'), 'index' => 'is_allowed', 'type' => 'options', 'options' => array('1' => Mage::helper('adminhtml')->__('Allowed'), '0' => Mage::helper('adminhtml')->__('Not allowed'))));
     parent::_prepareColumns();
 }
开发者ID:lightyoruichi,项目名称:Magento-Pre-Patched-Files,代码行数:10,代码来源:Grid.php


示例6: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('bagpercent_id', array('header' => Mage::helper('bagpercent')->__('ID'), 'align' => 'right', 'width' => '50px', 'index' => 'bagpercent_id'));
     /* $this->addColumn('title', array(
            'header'    => Mage::helper('combooffers')->__('Title'),
            'align'     =>'left',
            'index'     => 'title',
        ));*/
     /*$this->addColumn('productsid', array(
     	 'header'    => Mage::helper('combooffers')->__('Products Id'),
     	 'align'     =>'left',
     	 'index'     => 'productsid',
           ));*/
     $this->addColumn('sku', array('header' => Mage::helper('bagpercent')->__('SKU'), 'align' => 'left', 'index' => 'sku'));
     /*
           $this->addColumn('content', array(
     			'header'    => Mage::helper('combooffers')->__('Item Content'),
     			'width'     => '150px',
     			'index'     => 'content',
           ));
     */
     $this->addColumn('status', array('header' => Mage::helper('bagpercent')->__('Status'), 'align' => 'left', 'width' => '80px', 'index' => 'status', 'type' => 'options', 'options' => array(1 => 'Enabled', 2 => 'Disabled')));
     $this->addColumn('action', array('header' => Mage::helper('bagpercent')->__('Action'), 'width' => '100', 'type' => 'action', 'getter' => 'getId', 'actions' => array(array('caption' => Mage::helper('bagpercent')->__('Edit'), 'url' => array('base' => '*/*/edit'), 'field' => 'id')), 'filter' => false, 'sortable' => false, 'index' => 'stores', 'is_system' => true));
     $this->addExportType('*/*/exportCsv', Mage::helper('bagpercent')->__('CSV'));
     $this->addExportType('*/*/exportXml', Mage::helper('bagpercent')->__('XML'));
     return parent::_prepareColumns();
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:27,代码来源:Grid.php


示例7: _prepareColumns

 /**
  * Prepare Rating Grid colunms
  *
  * @return Mage_Adminhtml_Block_Rating_Grid
  */
 protected function _prepareColumns()
 {
     $this->addColumn('rating_id', array('header' => Mage::helper('rating')->__('ID'), 'align' => 'right', 'width' => '50px', 'index' => 'rating_id'));
     $this->addColumn('rating_code', array('header' => Mage::helper('rating')->__('Rating Name'), 'index' => 'rating_code'));
     $this->addColumn('position', array('header' => Mage::helper('rating')->__('Sort Order'), 'align' => 'left', 'width' => '100px', 'index' => 'position'));
     return parent::_prepareColumns();
 }
开发者ID:quyip8818,项目名称:Mag,代码行数:12,代码来源:Grid.php


示例8: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('report', array('header' => Mage::helper('reports')->__('Report'), 'index' => 'report', 'type' => 'string', 'width' => 150, 'sortable' => false));
     $this->addColumn('comment', array('header' => Mage::helper('reports')->__('Description'), 'index' => 'comment', 'type' => 'string', 'sortable' => false));
     $this->addColumn('updated_at', array('header' => Mage::helper('reports')->__('Updated At'), 'index' => 'updated_at', 'type' => 'datetime', 'width' => 200, 'default' => Mage::helper('reports')->__('undefined'), 'sortable' => false));
     return parent::_prepareColumns();
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:7,代码来源:Grid.php


示例9: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('synonym_id', array('header' => Mage::helper('searchsphinx')->__('ID'), 'align' => 'right', 'width' => '50px', 'index' => 'synonym_id'));
     $this->addColumn('synonyms', array('header' => Mage::helper('searchsphinx')->__('Synonyms'), 'align' => 'left', 'index' => 'synonyms', 'renderer' => 'Mirasvit_SearchSphinx_Block_Adminhtml_Synonym_Grid_Renderer_Synonyms'));
     $this->addColumn('store', array('header' => Mage::helper('searchsphinx')->__('Store'), 'align' => 'left', 'width' => '200px', 'index' => 'store', 'type' => 'options', 'options' => Mage::getSingleton('adminhtml/system_store')->getStoreOptionHash()));
     return parent::_prepareColumns();
 }
开发者ID:guohuadeng,项目名称:aototechweb,代码行数:7,代码来源:Grid.php


示例10: _prepareColumns

 /**
  * Preparing colums for grid
  *
  * @return Testimonial_Block_Adminhtml_Testimonial_Grid
  */
 protected function _prepareColumns()
 {
     $this->addColumn('testimonial_id', array('header' => Mage::helper('testimonial')->__('ID'), 'align' => 'right', 'width' => '50px', 'index' => 'testimonial_id'));
     $this->addColumn('testimonial_name', array('header' => Mage::helper('testimonial')->__('Name'), 'align' => 'left', 'width' => '100px', 'index' => 'testimonial_name'));
     $this->addColumn('order_id', array('header' => Mage::helper('testimonial')->__('Order ID'), 'align' => 'left', 'width' => '100px', 'index' => 'order_id'));
     $this->addColumn('testimonial_text', array('header' => Mage::helper('testimonial')->__('Comment'), 'align' => 'left', 'width' => '300px', 'index' => 'testimonial_text'));
     /*	$this->addColumn('testimonial_image', array(
                 'header'    => Mage::helper('testimonial')->__('Photo'),
                 'align'     =>'left',
     			'width'     => '50px',
                 'index'     => 'testimonial_image',
     			'renderer'  => 'testimonial/adminhtml_testimonial_renderer_image'
             ));
     */
     $this->addColumn('country', array('header' => Mage::helper('testimonial')->__('Country'), 'align' => 'left', 'width' => '50px', 'index' => 'country'));
     $this->addColumn('email', array('header' => Mage::helper('testimonial')->__('Email ID'), 'align' => 'left', 'width' => '50px', 'index' => 'email'));
     $this->addColumn('address', array('header' => Mage::helper('testimonial')->__('Street Address'), 'align' => 'left', 'width' => '50px', 'index' => 'address'));
     $this->addColumn('created_time', array('header' => Mage::helper('testimonial')->__('Creation Time'), 'align' => 'left', 'width' => '70px', 'type' => 'date', 'default' => '--', 'index' => 'created_time'));
     $this->addColumn('update_time', array('header' => Mage::helper('testimonial')->__('Update Time'), 'align' => 'left', 'width' => '70px', 'type' => 'date', 'default' => '--', 'index' => 'update_time'));
     $this->addColumn('status', array('header' => Mage::helper('testimonial')->__('Status'), 'align' => 'left', 'width' => '70px', 'index' => 'status', 'type' => 'options', 'options' => array(1 => 'Enabled', 2 => 'Disabled')));
     $this->addColumn('action', array('header' => Mage::helper('testimonial')->__('Action'), 'width' => '70', 'align' => 'center', 'type' => 'action', 'getter' => 'getId', 'actions' => array(array('caption' => Mage::helper('testimonial')->__('Edit'), 'url' => array('base' => '*/*/edit'), 'field' => 'id')), 'filter' => false, 'sortable' => false, 'index' => 'stores', 'is_system' => true));
     $this->addExportType('*/*/exportCsv', Mage::helper('testimonial')->__('CSV'));
     $this->addExportType('*/*/exportXml', Mage::helper('testimonial')->__('XML'));
     return parent::_prepareColumns();
 }
开发者ID:supravatweb,项目名称:magento_extensions,代码行数:30,代码来源:Grid.php


示例11: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('customer_id', array('header' => Mage::helper('affiliate')->__('#'), 'align' => 'right', 'width' => '25px', 'index' => 'customer_id'));
     $this->addColumn('affiliate_name', array('header' => Mage::helper('affiliate')->__('Name'), 'align' => 'left', 'index' => 'customer_id', 'width' => '250px', 'renderer' => 'affiliate/adminhtml_renderer_name', 'filter_condition_callback' => array($this, '_filterReferralnameCondition')));
     $this->addColumn('referral_code', array('header' => Mage::helper('affiliate')->__('Referral Code'), 'align' => 'left', 'index' => 'referral_code', 'width' => '250px'));
     $this->addColumn('affiliate_email', array('header' => Mage::helper('affiliate')->__('Email'), 'align' => 'left', 'index' => 'customer_id', 'width' => '200px', 'renderer' => 'affiliate/adminhtml_renderer_emailreferral', 'filter_condition_callback' => array($this, '_filterReferralemailCondition')));
     //        $this->addColumn('action',
     //            array(
     //                'header'    =>  Mage::helper('affiliate')->__('Action'),
     //                'width'     => '100',
     //                'type'      => 'action',
     //                'getter'    => 'getId',
     //                'actions'   => array(
     //                    array(
     //                        'caption'   => Mage::helper('affiliate')->__('Run Report'),
     //                        'url'       => array('base'=> '*/*/run'),
     //                        'field'     => 'customer_id'
     //                    )
     //                ),
     //                'filter'    => false,
     //                'sortable'  => false,
     //                'is_system' => true,
     //        ));
     //
     $this->addColumn('group_name', array('header' => Mage::helper('affiliate')->__('Group Name'), 'align' => 'left', 'index' => 'customer_id', 'filter' => false, 'renderer' => 'affiliate/adminhtml_renderer_affiliategroup'));
     $this->addColumn('affiliate_report', array('header' => '', 'align' => 'left', 'index' => 'customer_id', 'width' => '200px', 'filter' => false, 'renderer' => 'affiliate/adminhtml_renderer_residualreport'));
     //
     //
     //        $this->addExportType('*/*/exportbinaryresidualCsv', Mage::helper('affiliate')->__('CSV'));
     //        $this->addExportType('*/*/exportbinaryresidualXml', Mage::helper('affiliate')->__('XML'));
     //
     return parent::_prepareColumns();
 }
开发者ID:Gilbertoavitia1,项目名称:AHBS,代码行数:33,代码来源:Grid.php


示例12: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('entity_id', array('header' => Mage::helper('customer')->__('ID'), 'width' => '50px', 'index' => 'entity_id', 'type' => 'number'));
     /*$this->addColumn('firstname', array(
           'header'    => Mage::helper('customer')->__('First Name'),
           'index'     => 'firstname'
       ));
       $this->addColumn('lastname', array(
           'header'    => Mage::helper('customer')->__('Last Name'),
           'index'     => 'lastname'
       ));*/
     $this->addColumn('name', array('header' => Mage::helper('customer')->__('Name'), 'index' => 'name'));
     $this->addColumn('email', array('header' => Mage::helper('customer')->__('Email'), 'width' => '150', 'index' => 'email'));
     $groups = Mage::getResourceModel('customer/group_collection')->addFieldToFilter('customer_group_id', array('gt' => 0))->load()->toOptionHash();
     $this->addColumn('group', array('header' => Mage::helper('customer')->__('Group'), 'width' => '100', 'index' => 'group_id', 'type' => 'options', 'options' => $groups));
     $this->addColumn('Telephone', array('header' => Mage::helper('customer')->__('Telephone'), 'width' => '100', 'index' => 'billing_telephone'));
     $this->addColumn('billing_postcode', array('header' => Mage::helper('customer')->__('ZIP'), 'width' => '90', 'index' => 'billing_postcode'));
     $this->addColumn('billing_country_id', array('header' => Mage::helper('customer')->__('Country'), 'width' => '100', 'type' => 'country', 'index' => 'billing_country_id'));
     $this->addColumn('billing_region', array('header' => Mage::helper('customer')->__('State/Province'), 'width' => '100', 'index' => 'billing_region'));
     $this->addColumn('customer_since', array('header' => Mage::helper('customer')->__('Customer Since'), 'type' => 'datetime', 'align' => 'center', 'index' => 'created_at', 'gmtoffset' => true));
     if (!Mage::app()->isSingleStoreMode()) {
         $this->addColumn('website_id', array('header' => Mage::helper('customer')->__('Website'), 'align' => 'center', 'width' => '80px', 'type' => 'options', 'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(true), 'index' => 'website_id'));
     }
     $this->addColumn('action', array('header' => Mage::helper('customer')->__('Action'), 'width' => '100', 'type' => 'action', 'getter' => 'getId', 'actions' => array(array('caption' => Mage::helper('customer')->__('Edit'), 'url' => array('base' => '*/*/edit'), 'field' => 'id')), 'filter' => false, 'sortable' => false, 'index' => 'stores', 'is_system' => true));
     $this->addExportType('*/*/exportCsv', Mage::helper('customer')->__('CSV'));
     $this->addExportType('*/*/exportXml', Mage::helper('customer')->__('Excel XML'));
     return parent::_prepareColumns();
 }
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:28,代码来源:Grid.php


示例13: _prepareColumns

 /**
  * Prepare grid colunms
  *
  * @return Mage_GoogleShopping_Block_Adminhtml_Types_Grid
  */
 protected function _prepareColumns()
 {
     $this->addColumn('attribute_set_name', array('header' => $this->__('Attributes Set'), 'index' => 'attribute_set_name'));
     $this->addColumn('target_country', array('header' => $this->__('Target Country'), 'width' => '150px', 'index' => 'target_country', 'renderer' => 'Mage_GoogleShopping_Block_Adminhtml_Types_Renderer_Country', 'filter' => false));
     $this->addColumn('items_total', array('header' => Mage::helper('Mage_Catalog_Helper_Data')->__('Total Qty Content Items'), 'width' => '150px', 'index' => 'items_total', 'filter' => false));
     return parent::_prepareColumns();
 }
开发者ID:relue,项目名称:magento2,代码行数:12,代码来源:Grid.php


示例14: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('thumbnail', array('renderer' => 'orderapproval/customercart_edit_grid_column_renderer_image', 'width' => '80', 'align' => 'center', 'index' => 'item', 'sortable' => false));
     $this->addColumn('product-name', array('header' => $this->__('Product Name'), 'renderer' => 'orderapproval/customercart_edit_grid_column_renderer_productoptions', 'align' => 'left', 'index' => 'item', 'sortable' => false));
     $this->addColumn('price', array('header' => $this->__('Price'), 'renderer' => 'orderapproval/customercart_edit_grid_column_renderer_price', 'width' => '60', 'align' => 'right', 'index' => 'item', 'sortable' => false));
     $this->addColumn('qty', array('header' => $this->__('Qty'), 'renderer' => 'orderapproval/customercart_edit_grid_column_renderer_qty', 'width' => '40', 'align' => 'center', 'index' => 'item', 'sortable' => false));
     $this->addColumn('subtotal', array('header' => $this->__('Total Price'), 'renderer' => 'orderapproval/customercart_edit_grid_column_renderer_subtotal', 'width' => '60', 'align' => 'right', 'index' => 'item', 'sortable' => false));
     /*  $this->addColumn('approve_item', array(
           'header'    =>  $this->__('Action'),
           'width'     => '60',
           'align'     => 'center',
           'type'      => 'action',
           'getter'    => 'getId',
           'actions'   => array(
             array(
               'caption' => $this->__('Approve'),
               'url' => array(  
              'base' => 'updateApprovalState',
                 'params' => array(
                   'state' => ZetaPrints_OrderApproval_Helper_Data::APPROVED)),
               'field'     => 'item' ),
             array(
               'caption' => $this->__('Decline'),
               'url' => array(
                 'base' => 'updateApprovalState',
                 'params' => array(
                   'state' => ZetaPrints_OrderApproval_Helper_Data::DECLINED)),
               'field'     => 'item' ),
           ),
           'filter'    => false,
           'sortable'  => false,
           ));
        * */
     return parent::_prepareColumns();
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:35,代码来源:Grid.php


示例15: _prepareColumns

 protected function _prepareColumns()
 {
     $helper = Mage::helper('adyen_subscription');
     $this->addColumn('entity_id', ['header' => $helper->__('ID'), 'align' => 'right', 'width' => 1, 'index' => 'entity_id', 'filter_index' => 'main_table.entity_id']);
     $this->addColumn('increment_id', ['header' => $helper->__('Increment ID'), 'align' => 'right', 'width' => 1, 'index' => 'increment_id', 'filter_index' => 'main_table.increment_id']);
     $this->addColumn('error_message', ['header' => $helper->__('Error Message'), 'index' => 'error_message']);
     if (!Mage::getStoreConfig(Mage_Customer_Model_Customer::XML_PATH_GENERATE_HUMAN_FRIENDLY_ID)) {
         $this->addColumn('customer_id', ['header' => $helper->__('Customer ID'), 'index' => 'customer_id']);
     } else {
         $this->addColumn('customer_increment_id', ['header' => $helper->__('Customer Inc.'), 'index' => 'customer_increment_id', 'filter_condition_callback' => array($this, '_customCustomerIncrementIdSort')]);
     }
     $this->addColumn('customer_email', ['header' => $helper->__('Customer Email'), 'index' => 'customer_email', 'filter_index' => 'ce.email']);
     $this->addColumn('customer_name', ['header' => $helper->__('Name'), 'index' => 'customer_name']);
     $this->addColumn('ba_method_code', ['type' => 'options', 'header' => $helper->__('Payment method'), 'index' => 'ba_method_code', 'options' => Mage::helper('payment')->getAllBillingAgreementMethods(), 'filter_index' => 'ba.method_code']);
     $this->addColumn('ba_reference_id', ['header' => $helper->__('Billing Agreement'), 'index' => 'ba_reference_id', 'filter_index' => 'ba.reference_id']);
     $this->addColumn('created_at', ['header' => $helper->__('Created at'), 'index' => 'created_at', 'filter_index' => 'main_table.created_at', 'type' => 'datetime']);
     //        $this->addColumn('ends_at', [
     //            'header'    => $helper->__('Ends at'),
     //            'index'     => 'ends_at',
     //            'type'      => 'datetime'
     //        ]);
     //
     //        $this->addColumn('next_order_at', [
     //            'header'    => $helper->__('Next shipment'),
     //            'index'     => 'next_order_at',
     //            'type'      => 'datetime'
     //        ]);
     $this->addColumn('status', ['header' => $helper->__('Status'), 'index' => 'status', 'type' => 'options', 'options' => Adyen_Subscription_Model_Subscription::getStatuses(), 'renderer' => 'Adyen_Subscription_Block_Adminhtml_Subscription_Renderer_Status', 'filter_index' => 'main_table.status']);
     $this->addColumn('action', ['header' => $helper->__('Actions'), 'width' => '1', 'type' => 'action', 'getter' => 'getId', 'actions' => [['caption' => $helper->__('View'), 'url' => ['base' => '*/subscription/view', 'params' => ['store' => $this->getRequest()->getParam('store')]], 'field' => 'id']], 'filter' => false, 'sortable' => false]);
     return parent::_prepareColumns();
 }
开发者ID:Adyen,项目名称:adyen-magento-subscription,代码行数:31,代码来源:Grid.php


示例16: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('id', array('header' => Mage::helper('M2ePro')->__('ID'), 'width' => '50px', 'align' => 'left', 'type' => 'text', 'index' => 'id', 'escape' => true, 'sortable' => false, 'filter' => false));
     $this->addColumn('name', array('header' => Mage::helper('M2ePro')->__('Name'), 'align' => 'left', 'type' => 'text', 'index' => 'name', 'escape' => true, 'sortable' => false, 'filter' => false));
     $this->addColumn('action', array('header' => Mage::helper('M2ePro')->__('Action'), 'align' => 'left', 'width' => '50px', 'type' => 'text', 'sortable' => false, 'filter' => false, 'actions' => array(0 => array('label' => Mage::helper('M2ePro')->__('Select'), 'value' => 'selectNewCharity')), 'frame_callback' => array($this, 'callbackColumnActions')));
     return parent::_prepareColumns();
 }
开发者ID:technomagegithub,项目名称:magento,代码行数:7,代码来源:Grid.php


示例17: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('real_order_id', array('header' => Mage::helper('sales')->__('Order #'), 'width' => '80px', 'index' => 'increment_id'));
     if (!Mage::app()->isSingleStoreMode()) {
         $this->addColumn('store_id', array('header' => Mage::helper('sales')->__('Purchased from (store)'), 'index' => 'store_id', 'type' => 'store', 'display_deleted' => true));
     }
     $this->addColumn('created_at', array('header' => Mage::helper('sales')->__('Purchased On'), 'index' => 'created_at', 'type' => 'datetime', 'width' => '100px'));
     /*$this->addColumn('billing_firstname', array(
                 'header' => Mage::helper('sales')->__('Bill to First name'),
                 'index' => 'billing_firstname',
             ));
     
             $this->addColumn('billing_lastname', array(
                 'header' => Mage::helper('sales')->__('Bill to Last name'),
                 'index' => 'billing_lastname',
             ));*/
     $this->addColumn('billing_name', array('header' => Mage::helper('sales')->__('Bill to Name'), 'index' => 'billing_name'));
     /*$this->addColumn('shipping_firstname', array(
                 'header' => Mage::helper('sales')->__('Ship to First name'),
                 'index' => 'shipping_firstname',
             ));
     
             $this->addColumn('shipping_lastname', array(
                 'header' => Mage::helper('sales')->__('Ship to Last name'),
                 'index' => 'shipping_lastname',
             ));*/
     $this->addColumn('shipping_name', array('header' => Mage::helper('sales')->__('Ship to Name'), 'index' => 'shipping_name'));
     $this->addColumn('base_grand_total', array('header' => Mage::helper('sales')->__('G.T. (Base)'), 'index' => 'base_grand_total', 'type' => 'currency', 'currency' => 'store_currency_code'));
     $this->addColumn('grand_total', array('header' => Mage::helper('sales')->__('G.T. (Purchased)'), 'index' => 'grand_total', 'type' => 'currency', 'currency' => 'order_currency_code'));
     $this->addColumn('status', array('header' => Mage::helper('sales')->__('Status'), 'index' => 'status', 'type' => 'options', 'width' => '70px', 'options' => Mage::getSingleton('sales/order_config')->getStatuses()));
     $this->addColumn('action', array('header' => Mage::helper('sales')->__('Action'), 'width' => '50px', 'type' => 'action', 'getter' => 'getId', 'actions' => array(array('caption' => Mage::helper('sales')->__('View'), 'url' => array('base' => '*/*/view'), 'field' => 'order_id')), 'filter' => false, 'sortable' => false, 'index' => 'stores', 'is_system' => true));
     $this->addRssList('rss/order/new', Mage::helper('sales')->__('New Order RSS'));
     return parent::_prepareColumns();
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:34,代码来源:Grid.php


示例18: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('id', array('header' => Mage::helper('dates')->__('ID'), 'width' => '50', 'index' => 'id'));
     $this->addColumn('title', array('header' => Mage::helper('dates')->__('Title'), 'index' => 'title'));
     $this->addColumn('date', array('header' => Mage::helper('dates')->__('Date'), 'align' => 'left', 'index' => 'date', 'type' => 'date'));
     return parent::_prepareColumns();
 }
开发者ID:outeredge,项目名称:edge-magento-module-dates,代码行数:7,代码来源:Grid.php


示例19: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('id', array('header' => 'ID', 'width' => 50, 'sortable' => false, 'index' => 'id', 'type' => 'int'));
     $this->addColumn('adminuser_name', array('header' => 'Name', 'sortable' => false, 'index' => 'adminuser_name', 'type' => 'string'));
     $this->addColumn('adminuser_email', array('header' => 'eMail', 'sortable' => false, 'index' => 'adminuser_email', 'type' => 'string'));
     $this->addColumn('scope', array('header' => 'Scope', 'sortable' => false, 'index' => 'scope', 'type' => 'string'));
     $this->addColumn('scope_id', array('header' => 'ScopeID', 'sortable' => false, 'index' => 'scope_id', 'type' => 'int'));
     $this->addColumn('settings_path', array('header' => 'ScopeID', 'sortable' => true, 'index' => 'settings_path', 'type' => 'string'));
     $this->addColumn('oldvalue', array('header' => 'OldValue', 'sortable' => false, 'index' => 'oldvalue', 'type' => 'string'));
     $this->addColumn('newvalue', array('header' => 'NewValue', 'sortable' => false, 'index' => 'newvalue', 'type' => 'string'));
     //        $this->addColumn('action', array(
     //            'header'  => 'Action',
     //            'type'    => 'action',
     //            'getter'  => 'getId',
     //            'filter'  => false,
     //            'actions' => array(
     //                array(
     //                    'caption' => 'Edit',
     //                    'url'     => array(
     //                        'base' => '*/*/edit',
     //                    ),
     //                    'field'   => 'id',
     //                )
     //            ),
     //        ));
     return parent::_prepareColumns();
 }
开发者ID:kkrieger85,项目名称:Mod14v_Logsettings,代码行数:27,代码来源:Grid.php


示例20: _prepareColumns

 protected function _prepareColumns()
 {
     /*
     $this->addColumn('like_id', array(
                 'header'    => Mage::helper('like')->__('Like ID'),
                 'align'     => 'right',
     	'type'		=> 'number',
                 'index'     => 'like_id',
     	'filter' 	=> false,
     	'sortable'  => true,
             ));
     */
     $this->addColumn('product_id', array('header' => Mage::helper('like')->__('Product Id'), 'align' => 'right', 'width' => '120px', 'index' => 'product_id'));
     $this->addColumn('product_name', array('header' => Mage::helper('like')->__('Product Name'), 'align' => 'left', 'width' => '200px', 'index' => 'product_id', 'filter' => false, 'sortable' => false, 'renderer' => 'Vijay_Like_Block_Adminhtml_Renderer_Productname'));
     $this->addColumn('product_sku', array('header' => Mage::helper('like')->__('Product SKU'), 'align' => 'left', 'width' => '120px', 'index' => 'product_id', 'filter' => false, 'sortable' => false, 'renderer' => 'Vijay_Like_Block_Adminhtml_Renderer_Productsku'));
     /*
             $this->addColumn('customer_id ', array(
                 'header'    => Mage::helper('like')->__('Customer Id'),
                 'align'     => 'left',
     	'width'		=> '120px',
                 'index'     => 'customer_id',
     	'filter' 	=> false,
     	'sortable'  => false,
     	'renderer'	=> 'Vijay_Like_Block_Adminhtml_Renderer_Customername'
             ));
     */
     $this->addColumn('like_count', array('header' => Mage::helper('like')->__('Like Count'), 'width' => '150', 'index' => 'like_count', 'filter' => false, 'sortable' => false));
     $this->addExportType('*/*/exportCsv', Mage::helper('like')->__('CSV'));
     // $this->addExportType('*/*/exportXml', Mage::helper('like')->__('XML'));
     return parent::_prepareColumns();
 }
开发者ID:subicura,项目名称:Magento-Product-Like,代码行数:31,代码来源:Grid.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap