Mage_Adminhtml_Block_Sales_Order_Create_Customer_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sales_Order_Create_Customer_Grid:

Mage_Adminhtml_Block_Widget_Grid Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getRowId ($row)
 getRowUrl ($row)
 getGridUrl ()

Protected Member Functions

 _prepareCollection ()
 _prepareColumns ()


Detailed Description

Adminhtml sales order create block

Author:
Magento Core Team <core@magentocommerce.com>

Definition at line 32 of file Grid.php.


Constructor & Destructor Documentation

__construct (  ) 

Constructor

By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes

Reimplemented from Varien_Object.

Definition at line 35 of file Grid.php.

00036     {
00037         parent::__construct();
00038         $this->setId('sales_order_create_customer_grid');
00039         $this->setRowClickCallback('order.selectCustomer.bind(order)');
00040         $this->setUseAjax(true);
00041         $this->setDefaultSort('entity_id');
00042     }


Member Function Documentation

_prepareCollection (  )  [protected]

Prepare grid collection object

Returns:
this

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 44 of file Grid.php.

00045     {
00046         $collection = Mage::getResourceModel('customer/customer_collection')
00047             ->addNameToSelect()
00048             ->addAttributeToSelect('email')
00049             ->addAttributeToSelect('created_at')
00050             ->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing', null, 'left')
00051             ->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left')
00052             ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')
00053             ->joinAttribute('billing_regione', 'customer_address/region', 'default_billing', null, 'left')
00054             ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left')
00055             ->joinField('store_name', 'core/store', 'name', 'store_id=store_id', null, 'left');
00056 
00057         $this->setCollection($collection);
00058 
00059         return parent::_prepareCollection();
00060     }

_prepareColumns (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 62 of file Grid.php.

00063     {
00064         $this->addColumn('entity_id', array(
00065             'header'    =>Mage::helper('sales')->__('ID'),
00066             'width'     =>'50px',
00067             'index'     =>'entity_id',
00068             'align'     => 'right',
00069         ));
00070         $this->addColumn('name', array(
00071             'header'    =>Mage::helper('sales')->__('Name'),
00072             'index'     =>'name'
00073         ));
00074         $this->addColumn('email', array(
00075             'header'    =>Mage::helper('sales')->__('Email'),
00076             'width'     =>'150px',
00077             'index'     =>'email'
00078         ));
00079         $this->addColumn('Telephone', array(
00080             'header'    =>Mage::helper('sales')->__('Telephone'),
00081             'width'     =>'100px',
00082             'index'     =>'billing_telephone'
00083         ));
00084         $this->addColumn('billing_postcode', array(
00085             'header'    =>Mage::helper('sales')->__('ZIP/Post Code'),
00086             'width'     =>'120px',
00087             'index'     =>'billing_postcode',
00088         ));
00089         $this->addColumn('billing_country_id', array(
00090             'header'    =>Mage::helper('sales')->__('Country'),
00091             'width'     =>'100px',
00092             'type'      =>'country',
00093             'index'     =>'billing_country_id',
00094         ));
00095         $this->addColumn('billing_regione', array(
00096             'header'    =>Mage::helper('sales')->__('State/Province'),
00097             'width'     =>'100px',
00098             'index'     =>'billing_regione',
00099         ));
00100 
00101         if (!Mage::app()->isSingleStoreMode()) {
00102             $this->addColumn('store_name', array(
00103                 'header'    =>Mage::helper('sales')->__('Signed Up From'),
00104                 'align'     => 'center',
00105                 'index'     =>'store_name',
00106                 'width'     =>'130px',
00107             ));
00108         }
00109 
00110         return parent::_prepareColumns();
00111     }

getGridUrl (  ) 

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 126 of file Grid.php.

00127     {
00128         return $this->getUrl('*/*/loadBlock', array('block'=>'customer_grid'));
00129     }

getRowId ( row  ) 

Deprecated since 1.1.7

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 116 of file Grid.php.

00117     {
00118         return $row->getId();
00119     }

getRowUrl ( row  ) 

Definition at line 121 of file Grid.php.

00122     {
00123         return $row->getId();
00124     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:22:59 2009 for Magento by  doxygen 1.5.8