Example #1
0
 /**
  * Prepare grid columns
  *
  * @return Mage_Sales_Block_Adminhtml_Recurring_Profile_Grid
  */
 protected function _prepareColumns()
 {
     $profile = Mage::getModel('sales/recurring_profile');
     $this->addColumn('reference_id', array('header' => $profile->getFieldLabel('reference_id'), 'index' => 'reference_id', 'html_decorators' => array('nobr'), 'width' => 1));
     $this->addColumn('customerid', array('header' => Mage::helper('catalog')->__('customer_id'), 'index' => 'order_info', 'renderer' => 'ITwebexperts_Itwebcommon_Block_Adminhtml_Sales_Recurring_Profile_Renderer_Customerid'));
     $this->addColumn('customer_name', array('header' => Mage::helper('catalog')->__('customer_name'), 'index' => 'order_info', 'renderer' => 'ITwebexperts_Itwebcommon_Block_Adminhtml_Sales_Recurring_Profile_Renderer_Customername'));
     $this->addColumn('customer_email', array('header' => Mage::helper('catalog')->__('customer_email'), 'index' => 'order_info', 'renderer' => 'ITwebexperts_Itwebcommon_Block_Adminhtml_Sales_Recurring_Profile_Renderer_Customeremail'));
     if (!Mage::app()->isSingleStoreMode()) {
         $this->addColumn('store_id', array('header' => Mage::helper('adminhtml')->__('Store'), 'index' => 'store_id', 'type' => 'store', 'store_view' => true, 'display_deleted' => true));
     }
     $this->addColumn('state', array('header' => $profile->getFieldLabel('state'), 'index' => 'state', 'type' => 'options', 'options' => $profile->getAllStates(), 'html_decorators' => array('nobr'), 'width' => 1));
     $this->addColumn('created_at', array('header' => $profile->getFieldLabel('created_at'), 'index' => 'created_at', 'type' => 'datetime', 'html_decorators' => array('nobr'), 'width' => 1));
     $this->addColumn('updated_at', array('header' => $profile->getFieldLabel('updated_at'), 'index' => 'updated_at', 'type' => 'datetime', 'html_decorators' => array('nobr'), 'width' => 1));
     $this->addColumn('next_cycle', array('header' => Mage::helper('catalog')->__('Next Bill'), 'index' => 'additional_info', 'type' => 'datetime', 'html_decorators' => array('nobr'), 'width' => 1, 'renderer' => 'ITwebexperts_Itwebcommon_Block_Adminhtml_Sales_Recurring_Profile_Renderer_Nextcycle'));
     $methods = array();
     foreach (Mage::helper('payment')->getRecurringProfileMethods() as $method) {
         $methods[$method->getCode()] = $method->getTitle();
     }
     $this->addColumn('method_code', array('header' => $profile->getFieldLabel('method_code'), 'index' => 'method_code', 'type' => 'options', 'options' => $methods));
     $this->addColumn('schedule_description', array('header' => $profile->getFieldLabel('schedule_description'), 'index' => 'schedule_description'));
     $this->addColumn('coupon_code', array('header' => Mage::helper('catalog')->__('coupon_code'), 'index' => 'order_info', 'renderer' => 'ITwebexperts_Itwebcommon_Block_Adminhtml_Sales_Recurring_Profile_Renderer_Couponused'));
     $this->addColumn('additional_info', array('header' => Mage::helper('catalog')->__('additional_info'), 'index' => 'additional_info', 'renderer' => 'ITwebexperts_Itwebcommon_Block_Adminhtml_Sales_Recurring_Profile_Renderer_Additional'));
     return parent::_prepareColumns();
 }
Example #2
0
 /**
  * Disable filters and paging
  *
  */
 public function __construct()
 {
     parent::__construct();
     $this->setId('customer_edit_tab_recurring_profile');
 }