76 if (!($oUser = $this->
getUser())) {
84 if (!$oActList && $oLists->count()) {
85 $this->_iAllArtCnt = $oUser->getRecommListsCount();
86 $iNrofCatArticles = (int) $this->
getConfig()->getConfigParam(
'iNrofCatArticles');
87 $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 10;
88 $this->_iCntPages = round($this->_iAllArtCnt / $iNrofCatArticles + 0.49);
105 $aParams[
'recommid'] = $oList->getId();
118 if ($this->_aUserRecommLists === null) {
119 $this->_aUserRecommLists =
false;
120 if (($oUser = $this->
getUser())) {
122 $this->_aUserRecommLists = $oUser->getUserRecommLists();
136 if ($this->_oActRecommListArticles === null) {
137 $this->_oActRecommListArticles =
false;
140 $oItemList = $oRecommList->getArticles();
142 if ($oItemList->count()) {
143 foreach ($oItemList as $key => $oItem) {
144 if (!$oItem->isVisible()) {
145 $oRecommList->removeArticle($oItem->getId());
146 $oItemList->offsetUnset($key);
150 $oItem->text = $oRecommList->getArtDescription($oItem->getId());
152 $this->_oActRecommListArticles = $oItemList;
171 if ($this->_oActRecommList === null) {
172 $this->_oActRecommList =
false;
174 if (($oUser = $this->
getUser()) &&
178 $oRecommList =
oxNew(
'oxrecommlist');
179 $sUserIdField =
'oxrecommlists__oxuserid';
180 if (($oRecommList->load($sRecommId)) && $oUser->getId() === $oRecommList->$sUserIdField->value) {
181 $this->_oActRecommList = $oRecommList;
196 $this->_oActRecommList = $oRecommList;
214 if (($oUser = $this->
getUser())) {
216 $oRecommList =
oxNew(
'oxrecommlist');
217 $oRecommList->oxrecommlists__oxuserid =
new oxField($oUser->getId());
218 $oRecommList->oxrecommlists__oxshopid =
new oxField($this->
getConfig()->getShopId());
220 $this->_sThisTemplate =
'page/account/recommendationedit.tpl';
227 $oRecommList->oxrecommlists__oxtitle =
new oxField($sTitle);
228 $oRecommList->oxrecommlists__oxauthor =
new oxField($sAuthor);
229 $oRecommList->oxrecommlists__oxdesc =
new oxField($sText);
233 $this->_blSavedEntry = (bool) $oRecommList->save();
237 oxRegistry::get(
"oxUtilsView")->addErrorToDisplay($oEx,
false,
true,
'user');
271 $oRecommList->delete();
274 $this->_sThisTemplate =
'page/account/recommendationedit.tpl';
296 $oRecommList->removeArticle($sArtId);
298 $this->_sThisTemplate =
'page/account/recommendationedit.tpl';
308 if ($this->_oPageNavigation === null) {
309 $this->_oPageNavigation =
false;
310 if (!$this->getActiveRecommlist()) {
330 $aPath[
'title'] =
oxRegistry::getLang()->translateString(
'MY_ACCOUNT', $iBaseLanguage,
false);
331 $aPath[
'link'] =
oxRegistry::get(
"oxSeoEncoder")->getStaticUrl($sSelfLink .
'cl=account');
334 $aPath[
'title'] =
oxRegistry::getLang()->translateString(
'LISTMANIA', $iBaseLanguage,
false);
335 $aPath[
'link'] = $this->
getLink();