* All rights reserved * * Reuse or modification of this source code is not allowed * without written permission from creativestyle GmbH * * @category Creativestyle * @package Creativestyle_CheckoutByAmazon * @copyright Copyright (c) 2012 creativestyle GmbH (http://www.creativestyle.de) * @author Marek Zabrowarny / creativestyle GmbH */ class Creativestyle_CheckoutByAmazon_Block_Adminhtml_Logger_Exceptions_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setId('amazon_logger_exceptions_grid'); $this->setDefaultSort('creation_time'); $this->setDefaultDir('DESC'); $this->setSaveParametersInSession(true); } protected function _prepareCollection() { $collection = Mage::getModel('checkoutbyamazon/log_exception')->getCollection(); $this->setCollection($collection); return parent::_prepareCollection(); } protected function _prepareColumns() { $this->addColumn('creation_time', array( 'header' => Mage::helper('checkoutbyamazon')->__('Date'), 'index' => 'creation_time', 'type' => 'datetime', 'width' => '150px' )); $this->addColumn('area', array( 'header' => Mage::helper('checkoutbyamazon')->__('Area'), 'index' => 'area', 'width' => '200px' )); $this->addColumn('message', array( 'header' => Mage::helper('checkoutbyamazon')->__('Error message'), 'index' => 'message' )); $this->addColumn('error_code', array( 'header' => Mage::helper('checkoutbyamazon')->__('Error code'), 'index' => 'error_code', 'align' => 'center', 'width' => '100px' )); $this->addColumn('order_id', array( 'header' => Mage::helper('checkoutbyamazon')->__('Assigned orders'), 'index' => 'order_id', 'renderer' => 'checkoutbyamazon/adminhtml_logger_grid_renderer_order', 'filter_index' => 'order_increment_id', 'sortable' => false )); $this->addColumn('action', array( 'header' => Mage::helper('checkoutbyamazon')->__('Action'), 'type' => 'action', 'align' => 'center', 'width' => '50px', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('checkoutbyamazon')->__('View'), 'url' => array('base' => '*/*/view'), 'field' => 'id' ) ), 'filter' => false, 'sortable' => false, 'is_system' => true )); return parent::_prepareColumns(); } public function getRowUrl($row) { return $this->getUrl('*/*/view', array('id' => $row->getId())); } }