protected function _beforeToHtml() { $this->setId($this->getId() . '_' . $this->getIndex()); $this->getChild('reset_filter_button')->setData('onclick', $this->getJsObjectName() . '.resetFilter()'); $this->getChild('search_button')->setData('onclick', $this->getJsObjectName() . '.doFilter()'); return parent::_beforeToHtml(); }
protected function _beforeToHtml() { $this->addColumn('id', array('header' => Mage::helper('customer')->__('ID'), 'width' => '40px', 'align' => 'right', 'filter' => false, 'sortable' => false, 'default' => Mage::helper('customer')->__('n/a'), 'index' => 'customer_id')); $this->addColumn('firstname', array('header' => Mage::helper('customer')->__('First Name'), 'filter' => false, 'sortable' => false, 'default' => Mage::helper('customer')->__('Guest'), 'index' => 'customer_firstname')); $this->addColumn('lastname', array('header' => Mage::helper('customer')->__('Last Name'), 'filter' => false, 'sortable' => false, 'default' => Mage::helper('customer')->__('n/a'), 'index' => 'customer_lastname')); $this->addColumn('email', array('header' => Mage::helper('customer')->__('Email'), 'filter' => false, 'sortable' => false, 'default' => Mage::helper('customer')->__('n/a'), 'index' => 'customer_email')); $this->addColumn('ip_address', array('header' => Mage::helper('customer')->__('IP Address'), 'index' => 'remote_addr', 'default' => Mage::helper('customer')->__('n/a'), 'renderer' => 'adminhtml/customer_online_grid_renderer_ip')); $this->addColumn('session_start_time', array('header' => Mage::helper('customer')->__('Session Start Time'), 'align' => 'left', 'type' => 'datetime', 'default' => Mage::helper('customer')->__('n/a'), 'width' => '200px', 'index' => 'first_visit_at')); $this->addColumn('last_activity', array('header' => Mage::helper('customer')->__('Last Activity'), 'align' => 'left', 'type' => 'datetime', 'default' => Mage::helper('customer')->__('n/a'), 'width' => '200px', 'index' => 'last_visit_at')); $this->addColumn('type', array('header' => Mage::helper('customer')->__('Type'), 'index' => 'customer_id', 'type' => 'options', 'options' => array('c' => Mage::helper('customer')->__('Customer'), 'v' => Mage::helper('customer')->__('Visitor')), 'renderer' => 'adminhtml/customer_online_grid_renderer_type')); $this->addColumn('last_url', array('header' => Mage::helper('customer')->__('Last Url'), 'default' => Mage::helper('customer')->__('n/a'), 'index' => 'url')); $this->_initCollection(); return parent::_beforeToHtml(); }
protected function _beforeToHtml() { $this->setId('outbox_grid'); parent::_beforeToHtml(); }