Go to the documentation of this file.00001 <?php
00002
00010 class Account_Noticelist extends Account
00011 {
00016 protected $_sThisTemplate = 'page/account/noticelist.tpl';
00017
00023 protected $_aNoticeProductList = null;
00024
00030 protected $_aSimilarProductList = null;
00031
00037 protected $_aRecommList = null;
00038
00044 protected $_iViewIndexState = VIEW_INDEXSTATE_NOINDEXNOFOLLOW;
00045
00051 protected $_aSimilarRecommListIds = null;
00052
00063 public function render()
00064 {
00065 parent::render();
00066
00067
00068 $oUser = $this->getUser();
00069 if ( !$oUser ) {
00070 return $this->_sThisTemplate = $this->_sThisLoginTemplate;
00071 }
00072
00073 return $this->_sThisTemplate;
00074 }
00075
00081 public function getNoticeProductList()
00082 {
00083 if ( $this->_aNoticeProductList === null ) {
00084 if ( $oUser = $this->getUser() ) {
00085 $this->_aNoticeProductList = $oUser->getBasket( 'noticelist' )->getArticles();
00086 }
00087 }
00088 return $this->_aNoticeProductList;
00089 }
00090
00096 public function getSimilarProducts()
00097 {
00098
00099 if ( $this->_aSimilarProductList === null && count( $this->getNoticeProductList() ) ) {
00100
00101
00102 $this->_aSimilarProductList = false;
00103
00104
00105 if ( $oSimilarProd = current( $this->getNoticeProductList() ) ) {
00106 $this->_aSimilarProductList = $oSimilarProd->getSimilarProducts();
00107 }
00108 }
00109
00110 return $this->_aSimilarProductList;
00111 }
00112
00118 public function getSimilarRecommListIds()
00119 {
00120 if ( $this->_aSimilarRecommListIds === null ) {
00121 $this->_aSimilarRecommListIds = false;
00122
00123 $aNoticeProdList = $this->getNoticeProductList();
00124 if ( is_array( $aNoticeProdList ) && count( $aNoticeProdList ) ) {
00125 $this->_aSimilarRecommListIds = array_keys( $aNoticeProdList );
00126 }
00127 }
00128 return $this->_aSimilarRecommListIds;
00129 }
00130
00136 public function getBreadCrumb()
00137 {
00138 $aPaths = array();
00139 $aPath = array();
00140
00141 $aPath['title'] = oxRegistry::getLang()->translateString( 'PAGE_ACCOUNT_MY_ACCOUNT', oxRegistry::getLang()->getBaseLanguage(), false );
00142 $aPath['link'] = oxRegistry::get("oxSeoEncoder")->getStaticUrl( $this->getViewConfig()->getSelfLink() . "cl=account" );
00143 $aPaths[] = $aPath;
00144
00145 $aPath['title'] = oxRegistry::getLang()->translateString( 'PAGE_ACCOUNT_NOTICELIST_MYWISHLIST', oxRegistry::getLang()->getBaseLanguage(), false );
00146 $aPath['link'] = $this->getLink();
00147 $aPaths[] = $aPath;
00148
00149 return $aPaths;
00150 }
00151 }