예제 #1
0
파일: Grid.php 프로젝트: xiaoguizhidao/beut
 protected function _prepareColumns()
 {
     $this->addColumn('id', array('header' => Mage::helper('M2ePro')->__('ID'), 'align' => 'right', 'width' => '100px', 'type' => 'number', 'index' => 'id', 'filter_index' => 'main_table.id'));
     $this->addColumn('title', array('header' => Mage::helper('M2ePro')->__('Title'), 'align' => 'left', 'type' => 'text', 'index' => 'title', 'filter_index' => 'main_table.title', 'frame_callback' => array($this, 'callbackColumnTitle')));
     $this->addColumn('attribute_sets', array('header' => Mage::helper('M2ePro')->__('Attribute Sets'), 'align' => 'left', 'width' => '250px', 'filter' => false, 'sortable' => false, 'frame_callback' => array($this, 'callbackColumnAttributeSets')));
     $this->addColumn('create_date', array('header' => Mage::helper('M2ePro')->__('Creation Date'), 'align' => 'left', 'width' => '150px', 'type' => 'datetime', 'format' => Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM), 'index' => 'create_date', 'filter_index' => 'main_table.create_date'));
     $this->addColumn('update_date', array('header' => Mage::helper('M2ePro')->__('Update Date'), 'align' => 'left', 'width' => '150px', 'type' => 'datetime', 'format' => Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM), 'index' => 'update_date', 'filter_index' => 'main_table.update_date'));
     $this->addColumn('actions', array('header' => Mage::helper('M2ePro')->__('Actions'), 'align' => 'left', 'width' => '100px', 'type' => 'action', 'index' => 'actions', 'filter' => false, 'sortable' => false, 'getter' => 'getId', 'actions' => array(array('caption' => Mage::helper('M2ePro')->__('Edit'), 'url' => array('base' => '*/*/edit'), 'field' => 'id'), array('caption' => Mage::helper('M2ePro')->__('Delete'), 'url' => array('base' => '*/*/delete'), 'field' => 'id', 'confirm' => Mage::helper('M2ePro')->__('Are you sure?')))));
     return parent::_prepareColumns();
 }
예제 #2
0
파일: Grid.php 프로젝트: xiaoguizhidao/beut
 protected function _prepareColumns()
 {
     $this->addColumn('create_date', array('header' => Mage::helper('M2ePro')->__('Creation Date'), 'align' => 'left', 'width' => '165px', 'type' => 'datetime', 'format' => Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM), 'index' => 'create_date', 'filter_index' => 'main_table.create_date'));
     if (count(Mage::helper('M2ePro/Component')->getActiveComponents()) > 1) {
         $this->addColumn('component_mode', array('header' => Mage::helper('M2ePro')->__('Channel'), 'align' => 'right', 'width' => '120px', 'type' => 'options', 'index' => 'component_mode', 'filter_index' => 'main_table.component_mode', 'sortable' => false, 'options' => $this->getComponentModeFilterOptions()));
     }
     $this->addColumn('channel_order_id', array('header' => Mage::helper('M2ePro')->__('Order #'), 'align' => 'left', 'width' => '180px', 'sortable' => false, 'index' => 'channel_order_id', 'frame_callback' => array($this, 'callbackColumnChannelOrderId'), 'filter_condition_callback' => array($this, 'callbackFilterChannelOrderId')));
     $this->addColumn('magento_order_number', array('header' => Mage::helper('M2ePro')->__('Magento Order #'), 'align' => 'left', 'width' => '150px', 'index' => 'so.increment_id', 'frame_callback' => array($this, 'callbackColumnMagentoOrderNumber')));
     $this->addColumn('type', array('header' => Mage::helper('M2ePro')->__('Type'), 'align' => 'left', 'width' => '65px', 'index' => 'type', 'type' => 'options', 'options' => array(Ess_M2ePro_Model_Order_Log::TYPE_ERROR => Mage::helper('M2ePro')->__('Error'), Ess_M2ePro_Model_Order_Log::TYPE_WARNING => Mage::helper('M2ePro')->__('Warning'), Ess_M2ePro_Model_Order_Log::TYPE_SUCCESS => Mage::helper('M2ePro')->__('Success'), Ess_M2ePro_Model_Order_Log::TYPE_NOTICE => Mage::helper('M2ePro')->__('Notice')), 'frame_callback' => array($this, 'callbackColumnType')));
     $this->addColumn('message', array('header' => Mage::helper('M2ePro')->__('Description'), 'align' => 'left', 'width' => '*', 'index' => 'message', 'frame_callback' => array($this, 'callbackColumnMessage')));
     $this->addColumn('initiator', array('header' => Mage::helper('M2ePro')->__('Run Mode'), 'align' => 'left', 'width' => '65px', 'index' => 'initiator', 'type' => 'options', 'options' => array(Ess_M2ePro_Model_Order_Log::INITIATOR_UNKNOWN => Mage::helper('M2ePro')->__('Unknown'), Ess_M2ePro_Model_Order_Log::INITIATOR_EXTENSION => Mage::helper('M2ePro')->__('Automatic'), Ess_M2ePro_Model_Order_Log::INITIATOR_USER => Mage::helper('M2ePro')->__('Manual')), 'frame_callback' => array($this, 'callbackColumnInitiator')));
     return parent::_prepareColumns();
 }
예제 #3
0
파일: Grid.php 프로젝트: xiaoguizhidao/beut
 protected function _prepareColumns()
 {
     $this->addColumn('id', array('header' => Mage::helper('M2ePro')->__('ID'), 'align' => 'right', 'width' => '100px', 'type' => 'number', 'index' => 'id', 'filter_index' => 'main_table.id'));
     $this->addColumn('title', array('header' => Mage::helper('M2ePro')->__('Title'), 'align' => 'left', 'type' => 'text', 'index' => 'title', 'filter_index' => 'main_table.title', 'frame_callback' => array($this, 'callbackColumnTitle')));
     if (count(Mage::helper('M2ePro/Component')->getActiveComponents()) > 1) {
         $this->addColumn('component_mode', array('header' => Mage::helper('M2ePro')->__('Channel'), 'align' => 'left', 'width' => '120px', 'type' => 'options', 'index' => 'component_mode', 'filter_index' => 'main_table.component_mode', 'sortable' => false, 'options' => $this->getComponentModeFilterOptions()));
     }
     $this->addColumn('create_date', array('header' => Mage::helper('M2ePro')->__('Creation Date'), 'align' => 'left', 'width' => '150px', 'type' => 'datetime', 'format' => Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM), 'index' => 'create_date', 'filter_index' => 'main_table.create_date'));
     $this->addColumn('update_date', array('header' => Mage::helper('M2ePro')->__('Update Date'), 'align' => 'left', 'width' => '150px', 'type' => 'datetime', 'format' => Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM), 'index' => 'update_date', 'filter_index' => 'main_table.update_date'));
     $confirm = 'Be attentive! By deleting account you delete all information on it from M2E Pro server. ';
     $confirm .= 'This will cause inappropriate work of all accounts\' copies.';
     $confirm = Mage::helper('M2ePro')->__($confirm);
     $this->addColumn('actions', array('header' => Mage::helper('M2ePro')->__('Actions'), 'align' => 'left', 'width' => '150px', 'type' => 'action', 'index' => 'actions', 'filter' => false, 'sortable' => false, 'getter' => 'getId', 'actions' => array(array('caption' => Mage::helper('M2ePro')->__('Edit'), 'url' => array('base' => '*/*/edit'), 'field' => 'id'), array('caption' => Mage::helper('M2ePro')->__('Delete'), 'url' => array('base' => '*/*/delete'), 'field' => 'id', 'confirm' => $confirm))));
     return parent::_prepareColumns();
 }