Public Member Functions | |
__construct () | |
getHeaderHtml () | |
getHeaderWidth () | |
getCancelUrl () | |
Protected Member Functions | |
_getSession () |
Definition at line 35 of file Create.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 Mage_Adminhtml_Block_Widget_Form_Container.
Definition at line 37 of file Create.php.
00038 { 00039 $this->_objectId = 'order_id'; 00040 $this->_controller = 'sales_order'; 00041 $this->_mode = 'create'; 00042 00043 parent::__construct(); 00044 00045 $this->setId('sales_order_create'); 00046 00047 $customerId = $this->_getSession()->getCustomerId(); 00048 $storeId = $this->_getSession()->getStoreId(); 00049 00050 00051 $this->_updateButton('save', 'label', Mage::helper('sales')->__('Submit Order')); 00052 $this->_updateButton('save', 'onclick', "order.submit()"); 00053 $this->_updateButton('save', 'id', 'submit_order_top_button'); 00054 if (is_null($customerId) || !$storeId) { 00055 $this->_updateButton('save', 'style', 'display:none'); 00056 } 00057 00058 $this->_updateButton('back', 'id', 'back_order_top_button'); 00059 $this->_updateButton('reset', 'id', 'reset_order_top_button'); 00060 00061 if (is_null($customerId)) { 00062 $this->_updateButton('reset', 'style', 'display:none'); 00063 } else { 00064 $this->_updateButton('back', 'style', 'display:none'); 00065 } 00066 00067 //$this->_removeButton('back'); 00068 $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getUrl('*/sales_order/') . '\');'); 00069 00070 $confirm = Mage::helper('sales')->__('Are you sure you want to cancel this order?'); 00071 $this->_updateButton('reset', 'label', Mage::helper('sales')->__('Cancel')); 00072 $this->_updateButton('reset', 'class', 'cancel'); 00073 $this->_updateButton('reset', 'onclick', 'deleteConfirm(\''.$confirm.'\', \'' . $this->getCancelUrl() . '\')'); 00074 00075 }
_getSession | ( | ) | [protected] |
Retrieve quote session object
Definition at line 95 of file Create.php.
00096 { 00097 return Mage::getSingleton('adminhtml/session_quote'); 00098 }
getCancelUrl | ( | ) |
Definition at line 100 of file Create.php.
00101 { 00102 if ($this->_getSession()->getOrder()->getId()) { 00103 $url = $this->getUrl('*/sales_order/view', array( 00104 'order_id'=>Mage::getSingleton('adminhtml/session_quote')->getOrder()->getId() 00105 )); 00106 } 00107 else { 00108 $url = $this->getUrl('*/*/cancel'); 00109 } 00110 00111 return $url; 00112 }
getHeaderHtml | ( | ) |
Get header HTML
Reimplemented from Mage_Adminhtml_Block_Widget_Form_Container.
Definition at line 77 of file Create.php.
00078 { 00079 $out = '<div id="order-header">'; 00080 $out.= $this->getLayout()->createBlock('adminhtml/sales_order_create_header')->toHtml(); 00081 $out.= '</div>'; 00082 return $out; 00083 }
getHeaderWidth | ( | ) |
Reimplemented from Mage_Adminhtml_Block_Widget_Form_Container.
Definition at line 85 of file Create.php.