Public Member Functions | |
getCustomer () | |
getGroupName () | |
getCustomerLog () | |
getCreateDate () | |
getStoreCreateDate () | |
getStoreCreateDateTimezone () | |
getLastLoginDate () | |
getStoreLastLoginDate () | |
getStoreLastLoginDateTimezone () | |
getCurrentStatus () | |
getIsConfirmedStatus () | |
getCreatedInStore () | |
getStoreId () | |
getBillingAddressHtml () | |
getAccordionHtml () | |
getSalesHtml () | |
getTabLabel () | |
getTabTitle () | |
canShowTab () | |
isHidden () | |
Protected Attributes | |
$_customer | |
$_customerLog |
Definition at line 34 of file View.php.
canShowTab | ( | ) |
Implements Mage_Adminhtml_Block_Widget_Tab_Interface.
Definition at line 184 of file View.php.
00185 { 00186 if (Mage::registry('current_customer')->getId()) { 00187 return true; 00188 } 00189 return false; 00190 }
getAccordionHtml | ( | ) |
Definition at line 164 of file View.php.
00165 { 00166 return $this->getChildHtml('accordion'); 00167 }
getBillingAddressHtml | ( | ) |
Definition at line 152 of file View.php.
00153 { 00154 $html = ''; 00155 if ($address = $this->getCustomer()->getPrimaryBillingAddress()) { 00156 $html = $address->format('html'); 00157 } 00158 else { 00159 $html = Mage::helper('customer')->__("Customer doesn't have primary billing address"); 00160 } 00161 return $html; 00162 }
getCreateDate | ( | ) |
Definition at line 70 of file View.php.
00071 { 00072 $date = Mage::app()->getLocale()->date($this->getCustomer()->getCreatedAtTimestamp()); 00073 return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true); 00074 }
getCreatedInStore | ( | ) |
Definition at line 142 of file View.php.
00143 { 00144 return Mage::app()->getStore($this->getCustomer()->getStoreId())->getName(); 00145 }
getCurrentStatus | ( | ) |
Definition at line 120 of file View.php.
00121 { 00122 $log = $this->getCustomerLog(); 00123 if ($log->getLogoutAt() || 00124 strtotime(now())-strtotime($log->getLastVisitAt())>Mage_Log_Model_Visitor::getOnlineMinutesInterval()*60) { 00125 return Mage::helper('customer')->__('Offline'); 00126 } 00127 return Mage::helper('customer')->__('Online'); 00128 }
getCustomer | ( | ) |
Definition at line 43 of file View.php.
00044 { 00045 if (!$this->_customer) { 00046 $this->_customer = Mage::registry('current_customer'); 00047 } 00048 return $this->_customer; 00049 }
getCustomerLog | ( | ) |
Definition at line 60 of file View.php.
00061 { 00062 if (!$this->_customerLog) { 00063 $this->_customerLog = Mage::getModel('log/customer') 00064 ->load($this->getCustomer()->getId()); 00065 00066 } 00067 return $this->_customerLog; 00068 }
getGroupName | ( | ) |
Definition at line 51 of file View.php.
00052 { 00053 if ($groupId = $this->getCustomer()->getGroupId()) { 00054 return Mage::getModel('customer/group') 00055 ->load($groupId) 00056 ->getCustomerGroupCode(); 00057 } 00058 }
getIsConfirmedStatus | ( | ) |
Definition at line 130 of file View.php.
00131 { 00132 $this->getCustomer(); 00133 if (!$this->_customer->getConfirmation()) { 00134 return Mage::helper('customer')->__('Confirmed'); 00135 } 00136 if ($this->_customer->isConfirmationRequired()) { 00137 return Mage::helper('customer')->__('Not confirmed, cannot login'); 00138 } 00139 return Mage::helper('customer')->__('Not confirmed, can login'); 00140 }
getLastLoginDate | ( | ) |
Definition at line 92 of file View.php.
00093 { 00094 if ($date = $this->getCustomerLog()->getLoginAtTimestamp()) { 00095 $date = Mage::app()->getLocale()->date($date); 00096 return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true); 00097 } 00098 return Mage::helper('customer')->__('Never'); 00099 }
getSalesHtml | ( | ) |
getStoreCreateDate | ( | ) |
Definition at line 76 of file View.php.
00077 { 00078 $date = Mage::app()->getLocale()->storeDate( 00079 $this->getCustomer()->getStoreId(), 00080 $this->getCustomer()->getCreatedAtTimestamp(), 00081 true 00082 ); 00083 return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true); 00084 }
getStoreCreateDateTimezone | ( | ) |
Definition at line 86 of file View.php.
00087 { 00088 return Mage::app()->getStore($this->getCustomer()->getStoreId()) 00089 ->getConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_TIMEZONE); 00090 }
getStoreId | ( | ) |
Definition at line 147 of file View.php.
00148 { 00149 return $this->getCustomer()->getStoreId(); 00150 }
getStoreLastLoginDate | ( | ) |
Definition at line 101 of file View.php.
00102 { 00103 if ($date = $this->getCustomerLog()->getLoginAtTimestamp()) { 00104 $date = Mage::app()->getLocale()->storeDate( 00105 $this->getCustomer()->getStoreId(), 00106 $date, 00107 true 00108 ); 00109 return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true); 00110 } 00111 return Mage::helper('customer')->__('Never'); 00112 }
getStoreLastLoginDateTimezone | ( | ) |
Definition at line 114 of file View.php.
00115 { 00116 return Mage::app()->getStore($this->getCustomer()->getStoreId()) 00117 ->getConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_TIMEZONE); 00118 }
getTabLabel | ( | ) |
Implements Mage_Adminhtml_Block_Widget_Tab_Interface.
Definition at line 174 of file View.php.
00175 { 00176 return Mage::helper('customer')->__('Customer View'); 00177 }
getTabTitle | ( | ) |
Implements Mage_Adminhtml_Block_Widget_Tab_Interface.
Definition at line 179 of file View.php.
00180 { 00181 return Mage::helper('customer')->__('Customer View'); 00182 }
isHidden | ( | ) |
Implements Mage_Adminhtml_Block_Widget_Tab_Interface.
Definition at line 192 of file View.php.
00193 { 00194 if (Mage::registry('current_customer')->getId()) { 00195 return false; 00196 } 00197 return true; 00198 }