72 if ( !( $oUser = $this->
getUser() ) ) {
80 if ( !$oActList && $oLists->count() ) {
81 $this->_iAllArtCnt = $oUser->getRecommListsCount();
82 $iNrofCatArticles = (int) $this->
getConfig()->getConfigParam(
'iNrofCatArticles' );
83 $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 10;
84 $this->_iCntPages = round( $this->_iAllArtCnt / $iNrofCatArticles + 0.49 );
101 $aParams[
'recommid'] = $oList->getId();
114 if ( $this->_aUserRecommLists === null ) {
115 $this->_aUserRecommLists =
false;
116 if ( ( $oUser = $this->
getUser() ) ) {
118 $this->_aUserRecommLists = $oUser->getUserRecommLists();
131 if ( $this->_oActRecommListArticles === null ) {
132 $this->_oActRecommListArticles =
false;
135 $oItemList = $oRecommList->getArticles();
137 if ( $oItemList->count() ) {
138 foreach ( $oItemList as $key => $oItem ) {
139 if ( !$oItem->isVisible() ) {
140 $oRecommList->removeArticle( $oItem->getId() );
141 $oItemList->offsetUnset( $key );
145 $oItem->text = $oRecommList->getArtDescription( $oItem->getId() );
147 $this->_oActRecommListArticles = $oItemList;
166 if ( $this->_oActRecommList === null ) {
167 $this->_oActRecommList =
false;
169 if ( ( $oUser = $this->
getUser() ) &&
172 $oRecommList =
oxNew(
'oxrecommlist' );
173 if ( ( $oRecommList->load( $sRecommId ) ) && $oUser->getId() === $oRecommList->oxrecommlists__oxuserid->value ) {
174 $this->_oActRecommList = $oRecommList;
191 $this->_oActRecommList = $oRecommList;
209 if ( ( $oUser = $this->
getUser() ) ) {
211 $oRecommList =
oxNew(
'oxrecommlist' );
212 $oRecommList->oxrecommlists__oxuserid =
new oxField( $oUser->getId());
213 $oRecommList->oxrecommlists__oxshopid =
new oxField( $this->
getConfig()->getShopId() );
215 $this->_sThisTemplate =
'page/account/recommendationedit.tpl';
222 $oRecommList->oxrecommlists__oxtitle =
new oxField( $sTitle );
223 $oRecommList->oxrecommlists__oxauthor =
new oxField( $sAuthor );
224 $oRecommList->oxrecommlists__oxdesc =
new oxField( $sText );
228 $this->_blSavedEntry = (bool) $oRecommList->save();
232 oxRegistry::get(
"oxUtilsView")->addErrorToDisplay( $oEx,
false,
true,
'user' );
265 $oRecommList->delete();
268 $this->_sThisTemplate =
'page/account/recommendationedit.tpl';
289 $oRecommList->removeArticle( $sArtId );
291 $this->_sThisTemplate =
'page/account/recommendationedit.tpl';
301 if ( $this->_oPageNavigation === null ) {
302 $this->_oPageNavigation =
false;
303 if ( !$this->getActiveRecommlist() ) {
325 $aPath[
'link'] = $this->
getLink();