Mage_Adminhtml_Block_Sales_Order_Create_Form Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sales_Order_Create_Form:

Mage_Adminhtml_Block_Sales_Order_Create_Abstract 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 ()
 getLoadBlockUrl ()
 getSaveUrl ()
 getCustomerSelectorDisplay ()
 getStoreSelectorDisplay ()
 getDataSelectorDisplay ()
 getOrderDataJson ()


Detailed Description

Definition at line 35 of file Form.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 37 of file Form.php.

00038     {
00039         parent::__construct();
00040         $this->setId('sales_order_create_form');
00041     }


Member Function Documentation

getCustomerSelectorDisplay (  ) 

Definition at line 61 of file Form.php.

00062     {
00063         $customerId = $this->getCustomerId();
00064         if (is_null($customerId)) {
00065             return 'block';
00066         }
00067         return 'none';
00068     }

getDataSelectorDisplay (  ) 

Definition at line 80 of file Form.php.

00081     {
00082         $storeId    = $this->getStoreId();
00083         $customerId = $this->getCustomerId();
00084         if (!is_null($customerId) && $storeId) {
00085             return 'block';
00086         }
00087         return 'none';
00088     }

getLoadBlockUrl (  ) 

Retrieve url for loading blocks

Returns:
string

Definition at line 47 of file Form.php.

00048     {
00049         return $this->getUrl('*/*/loadBlock');
00050     }

getOrderDataJson (  ) 

Definition at line 90 of file Form.php.

00091     {
00092         $data = array();
00093         if (!is_null($this->getCustomerId())) {
00094             $data['customer_id'] = $this->getCustomerId();
00095             $data['addresses'] = array();
00096             foreach ($this->getCustomer()->getAddresses() as $address) {
00097                 $data['addresses'][$address->getId()] = $address->getData();
00098             }
00099         }
00100         if (!is_null($this->getStoreId())) {
00101             $data['store_id'] = $this->getStoreId();
00102             $data['shipping_method_reseted'] = !(bool)$this->getQuote()->getShippingAddress()->getShippingMethod();
00103             $data['payment_method'] = $this->getQuote()->getPayment()->getMethod();
00104         }
00105         return Zend_Json::encode($data);
00106     }

getSaveUrl (  ) 

Retrieve url for form submiting

Returns:
string

Definition at line 56 of file Form.php.

00057     {
00058         return $this->getUrl('*/*/save');
00059     }

getStoreSelectorDisplay (  ) 

Definition at line 70 of file Form.php.

00071     {
00072         $storeId    = $this->getStoreId();
00073         $customerId = $this->getCustomerId();
00074         if (!is_null($customerId) && !$storeId) {
00075             return 'block';
00076         }
00077         return 'none';
00078     }


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