00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 class Mage_Adminhtml_Block_Sales_Order_Create_Header extends Mage_Adminhtml_Block_Sales_Order_Create_Abstract
00033 {
00034 protected function _toHtml()
00035 {
00036 if ($this->_getSession()->getOrder()->getId()) {
00037 return '<h3 class="icon-head head-sales-order">'.Mage::helper('sales')->__('Edit Order #%s', $this->_getSession()->getOrder()->getIncrementId()).'</h3>';
00038 }
00039
00040 $customerId = $this->getCustomerId();
00041 $storeId = $this->getStoreId();
00042 $out = '';
00043 if ($customerId && $storeId) {
00044 $out.= Mage::helper('sales')->__('Create New Order for %s in %s', $this->getCustomer()->getName(), $this->getStore()->getName());
00045 }
00046 elseif (!is_null($customerId) && $storeId){
00047 $out.= Mage::helper('sales')->__('Create New Order for New Customer in %s', $this->getStore()->getName());
00048 }
00049 elseif ($customerId) {
00050 $out.= Mage::helper('sales')->__('Create New Order for %s', $this->getCustomer()->getName());
00051 }
00052 elseif (!is_null($customerId)){
00053 $out.= Mage::helper('sales')->__('Create New Order for New Customer');
00054 }
00055 else {
00056 $out.= Mage::helper('sales')->__('Create New Order');
00057 }
00058 $out = $this->htmlEscape($out);
00059 $out = '<h3 class="icon-head head-sales-order">' . $out . '</h3>';
00060 return $out;
00061 }
00062 }