Esempio n. 1
0
 /**
  * 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;
 }
 /**
  * @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();
 }
Esempio n. 3
0
 /**
  * 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();
 }
Esempio n. 4
0
 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();
 }
Esempio n. 5
0
 /**
  * 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();
 }
Esempio n. 6
0
 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();
 }
Esempio n. 7
0
 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();
 }
Esempio n. 8
0
 /**
  * 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();
 }
Esempio n. 9
0
 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();
 }
Esempio n. 10
0
 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();
 }
Esempio n. 11
0
 /**
  * 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();
 }
Esempio n. 12
0
 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();
 }
Esempio n. 13
0
 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();
 }
Esempio n. 14
0
 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();
 }
Esempio n. 15
0
 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;
 }
Esempio n. 16
0
 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();
 }
Esempio n. 17
0
 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();
 }
Esempio n. 18
0
 protected function _prepareColumns()
 {
     $this->addColumn('stopword_id', array('header' => Mage::helper('searchsphinx')->__('ID'), 'align' => 'right', 'width' => '50px', 'index' => 'stopword_id'));
     $this->addColumn('word', array('header' => Mage::helper('searchsphinx')->__('Word'), 'align' => 'left', 'index' => 'word'));
     $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();
 }
Esempio n. 19
0
 protected function _prepareColumns()
 {
     $this->addColumn('id', array('header' => Mage::helper('affiliate')->__('#'), 'align' => 'right', 'width' => '25px', 'index' => '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('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('group_name', array('header' => Mage::helper('affiliate')->__('Group Name'), 'align' => 'left', 'index' => 'customer_id', 'filter' => false, 'renderer' => 'affiliate/adminhtml_renderer_affiliategroup'));
     $this->addColumn('start_period', array('header' => Mage::helper('affiliate')->__('Start Period'), 'align' => 'left', 'width' => '25px', 'index' => 'start_date', 'type' => 'datetime', 'format' => 'Y/MM/dd'));
     $this->addColumn('end_period', array('header' => Mage::helper('affiliate')->__('End Period'), 'align' => 'left', 'width' => '25px', 'index' => 'end_date', 'type' => 'datetime', 'format' => 'Y/MM/dd'));
     $this->addColumn('vp', array('header' => Mage::helper('affiliate')->__('VP'), 'align' => 'right', 'width' => '100px', 'filter' => false, 'index' => 'vp'));
     $this->addColumn('vg', array('header' => Mage::helper('affiliate')->__('VG'), 'width' => '100px', 'align' => 'right', 'filter' => false, 'index' => 'tvg'));
     $this->addColumn('vpleft', array('header' => Mage::helper('affiliate')->__('P. Izq'), 'align' => 'right', 'width' => '100px', 'filter' => false, 'index' => 'tleft'));
     $this->addColumn('vpright', array('header' => Mage::helper('affiliate')->__('P. Der'), 'align' => 'right', 'width' => '100px', 'filter' => false, 'index' => 'tright'));
     //      	$this->addColumn('cp', array(
     //        	'header'    => Mage::helper('affiliate')->__('C. Preferente'),
     //          	'align'     =>'right',
     //                'width'     => '100px',
     //                'filter'    => false,
     //          	'index'     => 'cp',
     //      	));
     $this->addColumn('cp', array('header' => Mage::helper('affiliate')->__('C. Preferente') . '(25%)', 'align' => 'right', 'width' => '100px', 'filter' => false, 'index' => 'cp', 'renderer' => 'affiliate/adminhtml_renderer_affiliatecp25'));
     $this->addColumn('paid', array('header' => Mage::helper('affiliate')->__('Paid'), 'align' => 'left', 'index' => 'paid', 'filter' => false));
     $this->addColumn('hold', array('header' => Mage::helper('affiliate')->__('Hold'), 'align' => 'left', 'index' => 'hold'));
     $this->addExportType('*/*/exportbinaryresidualCsv', Mage::helper('affiliate')->__('CSV'));
     $this->addExportType('*/*/exportbinaryresidualXml', Mage::helper('affiliate')->__('XML'));
     return parent::_prepareColumns();
 }
Esempio n. 20
0
 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();
 }
 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();
 }
Esempio n. 22
0
 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();
 }
Esempio n. 23
0
 protected function _prepareColumns()
 {
     $this->addColumn('website_title', array('header' => Mage::helper('core')->__('Website Name'), 'align' => 'left', 'index' => 'name', 'filter_index' => 'main_table.name', 'renderer' => 'adminhtml/system_store_grid_render_website'));
     $this->addColumn('group_title', array('header' => Mage::helper('core')->__('Store Name'), 'align' => 'left', 'index' => 'group_title', 'filter_index' => 'group_table.name', 'renderer' => 'adminhtml/system_store_grid_render_group'));
     $this->addColumn('store_title', array('header' => Mage::helper('core')->__('Store View Name'), 'align' => 'left', 'index' => 'store_title', 'filter_index' => 'store_table.name', 'renderer' => 'adminhtml/system_store_grid_render_store'));
     return parent::_prepareColumns();
 }
Esempio n. 24
0
 protected function _prepareColumns()
 {
     $this->addColumn('id', array('header' => __('ID'), 'align' => 'right', 'width' => '50px', 'index' => 'mapping_id'));
     $this->addColumn('name', array('header' => __('Name'), 'align' => 'left', 'index' => 'name'));
     $this->addColumn('action', array('header' => __('Action'), 'width' => '100', 'type' => 'action', 'getter' => 'getId', 'actions' => array(array('caption' => __('Edit'), 'url' => array('base' => '*/*/edit'), 'field' => 'id'), array('caption' => __('Delete'), 'url' => array('base' => '*/*/delete'), 'field' => 'id')), 'filter' => false, 'sortable' => false, 'is_system' => true));
     return parent::_prepareColumns();
 }
Esempio n. 25
0
 /**
  * Prepare grid columns
  *
  * @return Mage_Adminhtml_Block_System_Variable_Grid
  */
 protected function _prepareColumns()
 {
     $this->addColumn('variable_id', array('header' => Mage::helper('adminhtml')->__('Variable ID'), 'width' => '1', 'index' => 'variable_id'));
     $this->addColumn('code', array('header' => Mage::helper('adminhtml')->__('Variable Code'), 'index' => 'code'));
     $this->addColumn('name', array('header' => Mage::helper('adminhtml')->__('Name'), 'index' => 'name'));
     return parent::_prepareColumns();
 }
Esempio n. 26
0
 protected function _prepareColumns()
 {
     $this->addColumn('title', array('header' => Mage::helper('searchindex')->__('Title'), 'align' => 'left', 'index' => 'title', 'frame_callback' => array($this, '_renderTitle')));
     $this->addColumn('status', array('header' => Mage::helper('searchindex')->__('State'), 'align' => 'left', 'index' => 'status', 'width' => '150px', 'renderer' => 'Mirasvit_SearchIndex_Block_Adminhtml_Index_Renderer_State', 'filter' => false));
     $this->addColumn('action', array('header' => Mage::helper('searchindex')->__('Action'), 'width' => '100', 'type' => 'action', 'getter' => 'getId', 'actions' => array(array('caption' => Mage::helper('searchindex')->__('Edit'), 'url' => array('base' => '*/*/edit'), 'field' => 'id'), array('caption' => Mage::helper('searchindex')->__('Run Reindex'), 'url' => array('base' => '*/*/reindex'), 'field' => 'id')), 'filter' => false, 'sortable' => false, 'index' => 'stores', 'is_system' => true));
     return parent::_prepareColumns();
 }
Esempio n. 27
0
 /**
  * Configuration of grid
  */
 protected function _prepareColumns()
 {
     $this->addColumn('time', array('header' => Mage::helper('customer')->__('ID'), 'width' => '50px', 'align' => 'right', 'index' => 'customer_group_id'));
     $this->addColumn('type', array('header' => Mage::helper('customer')->__('Group Name'), 'index' => 'customer_group_code'));
     $this->addColumn('class_name', array('header' => Mage::helper('customer')->__('Tax Class'), 'index' => 'class_name', 'width' => '200px'));
     return parent::_prepareColumns();
 }
 protected function _prepareColumns()
 {
     $this->addColumn('in_attributes', array('header_css_class' => 'a-center', 'type' => 'checkbox', 'name' => 'in_attributes', 'values' => $this->_getSelectedAttribs(), 'field_name' => 'attributeitems[]', 'align' => 'center', 'index' => 'attribute_set_id'));
     $this->addColumn('attribute_set_id', array('header' => Mage::helper('catalog')->__('IDs'), 'sortable' => true, 'name' => 'attribute_set_id', 'width' => '60px', 'index' => 'attribute_set_id'));
     $this->addColumn('attribute_set_name', array('header' => Mage::helper('catalog')->__('Attribute Set Name (Does not include DEFAULT!)'), 'index' => 'attribute_set_name'));
     return parent::_prepareColumns();
 }
Esempio n. 29
0
 protected function _prepareColumns()
 {
     $this->addColumn('title', array('header' => Mage::helper('M2ePro')->__('Title'), 'align' => 'left', 'width' => '300px', 'type' => 'text', 'escape' => true, 'index' => 'title', 'filter_index' => 'title'));
     $this->addColumn('categories', array('header' => Mage::helper('M2ePro')->__('Categories'), 'align' => 'left', 'type' => 'text', 'sortable' => false, 'filter' => false, 'frame_callback' => array($this, 'callbackColumnCategories')));
     $this->addColumn('action', array('header' => Mage::helper('M2ePro')->__('Actions'), 'align' => 'left', 'width' => '50px', 'type' => 'text', 'sortable' => false, 'filter' => false, 'actions' => array(0 => array('label' => Mage::helper('M2ePro')->__('Edit Rule'), 'value' => 'categoryStepOne'), 1 => array('label' => Mage::helper('M2ePro')->__('Delete Rule'), 'value' => 'categoryDeleteGroup')), 'frame_callback' => array($this, 'callbackColumnActions')));
     return parent::_prepareColumns();
 }
Esempio n. 30
0
 protected function _prepareColumns()
 {
     $this->addColumn('name', array('header' => Mage::helper('catalog')->__('Tag Name'), 'index' => 'name'));
     $this->addColumn('popularity', array('header' => Mage::helper('catalog')->__('# of Use'), 'width' => '50px', 'align' => 'right', 'index' => 'popularity', 'type' => 'number'));
     $this->addColumn('status', array('header' => Mage::helper('catalog')->__('Status'), 'width' => '90px', 'index' => 'status', 'type' => 'options', 'options' => array(Mage_Tag_Model_Tag::STATUS_DISABLED => Mage::helper('catalog')->__('Disabled'), Mage_Tag_Model_Tag::STATUS_PENDING => Mage::helper('catalog')->__('Pending'), Mage_Tag_Model_Tag::STATUS_APPROVED => Mage::helper('catalog')->__('Approved'))));
     return parent::_prepareColumns();
 }