1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25:
26:
27: 28: 29: 30: 31:
32: class extends Mage_Adminhtml_Block_Sales_Order_Create_Abstract
33: {
34: protected function _toHtml()
35: {
36: if ($this->_getSession()->getOrder()->getId()) {
37: return '<h3 class="icon-head head-sales-order">'.Mage::helper('sales')->__('Edit Order #%s', $this->_getSession()->getOrder()->getIncrementId()).'</h3>';
38: }
39:
40: $customerId = $this->getCustomerId();
41: $storeId = $this->getStoreId();
42: $out = '';
43: if ($customerId && $storeId) {
44: $out.= Mage::helper('sales')->__('Create New Order for %s in %s', $this->getCustomer()->getName(), $this->getStore()->getName());
45: }
46: elseif (!is_null($customerId) && $storeId){
47: $out.= Mage::helper('sales')->__('Create New Order for New Customer in %s', $this->getStore()->getName());
48: }
49: elseif ($customerId) {
50: $out.= Mage::helper('sales')->__('Create New Order for %s', $this->getCustomer()->getName());
51: }
52: elseif (!is_null($customerId)){
53: $out.= Mage::helper('sales')->__('Create New Order for New Customer');
54: }
55: else {
56: $out.= Mage::helper('sales')->__('Create New Order');
57: }
58: $out = $this->htmlEscape($out);
59: $out = '<h3 class="icon-head head-sales-order">' . $out . '</h3>';
60: return $out;
61: }
62: }
63: