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(); }
protected function _prepareColumns() { $helper = Mage::helper('adyen_subscription'); $this->addColumn('entity_id', array('header' => $helper->__('History #'), 'index' => 'entity_id')); $this->addColumn('date', array('header' => $helper->__('Date'), 'index' => 'date', 'type' => 'datetime', 'width' => '100px')); $this->addColumn('username', array('header' => $helper->__('Admin mail'), 'index' => 'username', 'type' => 'integer')); $this->addColumn('email', array('header' => $helper->__('Customer mail'), 'index' => 'email')); $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('code', array('header' => $helper->__('Code'), 'index' => 'code')); return parent::_prepareColumns(); }