Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Magento
  5. *
  6. * @category Custom
  7. * @package Custom_Datefix
  8. */
  9. -->
  10. <config>
  11. <modules>
  12. <Custom_Datefix>
  13. <version>1.0.0</version>
  14. </Custom_Datefix>
  15. </modules>
  16. <global>
  17. <blocks>
  18. <adminhtml>
  19. <rewrite>
  20. <customer_edit_tab_view>Custom_Datefix_Block_Customer_Edit_Tab_View</customer_edit_tab_view>
  21. </rewrite>
  22. </adminhtml>
  23. </blocks>
  24. </global>
  25. </config>
  26.  
  27. <?xml version="1.0"?>
  28. <!--
  29. /**
  30. * Magento
  31. *
  32. * @category Custom
  33. * @package Custom_Datefix
  34. */
  35. -->
  36. <config>
  37. <modules>
  38. <Custom_Datefix>
  39. <version>1.0.0</version>
  40. </Custom_Datefix>
  41. </modules>
  42. <global>
  43. <blocks>
  44. <adminhtml>
  45. <rewrite>
  46. <customer_edit_tab_view>Custom_Datefix_Block_Customer_Edit_Tab_View</customer_edit_tab_view>
  47. </rewrite>
  48. </adminhtml>
  49. </blocks>
  50. </global>
  51. </config>
  52.  
  53. <?php
  54.  
  55. /**
  56. * Magento
  57. *
  58. *
  59. * Customer account form block
  60. *
  61. * @category Custom
  62. * @package Custom_Datefix
  63. */
  64. class Custom_Datefix_Block_Customer_Edit_Tab_View
  65. extends Mage_Adminhtml_Block_Customer_Edit_Tab_View
  66. {
  67. /**
  68. * Get customer last login date
  69. *
  70. * @return string
  71. */
  72. public function getLastLoginDate()
  73. {
  74. if ($date = $this->getCustomerLog()->getLoginAtTimestamp()) {
  75. $date = Mage::app()->getLocale()->storeDate(
  76. $this->getCustomer()->getStoreId(),
  77. $date,
  78. true
  79. );
  80. return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true);
  81. }
  82. return Mage::helper('customer')->__('Never');
  83. }
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement