
Public Member Functions | |
| __construct () | |
| getLoadBlockUrl () | |
| getSaveUrl () | |
| getCustomerSelectorDisplay () | |
| getStoreSelectorDisplay () | |
| getDataSelectorDisplay () | |
| getOrderDataJson () | |
Definition at line 35 of file Form.php.
| __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 }
| 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 | ( | ) |
| 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 | ( | ) |
| 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 }
1.5.8