142 if (!$oConfig->getConfigParam(
"bl_perfLoadReviews")) {
154 if ($oActiveRecommList) {
155 if ($oList && $oList->count()) {
156 $this->_iAllArtCnt = $oActiveRecommList->getArtCount();
159 $iNrofCatArticles = $this->
getConfig()->getConfigParam(
'iNrofCatArticles');
160 $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 10;
161 $this->_iCntPages = round($this->_iAllArtCnt / $iNrofCatArticles + 0.49);
187 if ($dRating !== null) {
188 $dRating = (int) $dRating;
192 if ($dRating !== null && $dRating >= 1 && $dRating <= 5) {
193 $oRating =
oxNew(
'oxrating');
194 if ($oRating->allowRating($oRevUser->getId(), $sType, $oActObject->getId())) {
195 $oRating->oxratings__oxuserid =
new oxField($oRevUser->getId());
196 $oRating->oxratings__oxtype =
new oxField($sType);
197 $oRating->oxratings__oxobjectid =
new oxField($oActObject->getId());
198 $oRating->oxratings__oxrating =
new oxField($dRating);
201 $oActObject->addToRatingAverage($dRating);
203 $this->_blReviewSendStatus =
true;
207 if (($sReviewText = trim((
string )
oxRegistry::getConfig()->getRequestParameter(
'rvw_txt',
true)))) {
208 $oReview =
oxNew(
'oxreview');
209 $oReview->oxreviews__oxobjectid =
new oxField($oActObject->getId());
210 $oReview->oxreviews__oxtype =
new oxField($sType);
213 $oReview->oxreviews__oxuserid =
new oxField($oRevUser->getId());
214 $oReview->oxreviews__oxrating =
new oxField(($dRating !== null) ? $dRating : null);
217 $this->_blReviewSendStatus =
true;
230 if ($this->_oRevUser === null) {
231 $this->_oRevUser =
false;
232 $oUser =
oxNew(
"oxuser");
234 if ($sUserId = $oUser->getReviewUserId($this->getReviewUserHash())) {
236 if ($oUser->load($sUserId)) {
237 $this->_oRevUser = $oUser;
239 } elseif ($oUser = $this->
getUser()) {
241 $this->_oRevUser = $oUser;
266 if ($this->_oActObject === null) {
267 $this->_oActObject =
false;
270 $this->_oActObject = $oProduct;
272 $this->_oActObject = $oRecommList;
288 $sType =
'oxarticle';
290 $sType =
'oxrecommlist';
307 if ($this->_oActiveRecommList === null) {
308 $this->_oActiveRecommList =
false;
311 $oActiveRecommList =
oxNew(
'oxrecommlist');
312 if ($oActiveRecommList->load($sRecommId)) {
313 $this->_oActiveRecommList = $oActiveRecommList;
328 if ($this->_blRate === null) {
329 $this->_blRate =
false;
331 $oRating =
oxNew(
'oxrating');
332 $this->_blRate = $oRating->allowRating(
350 if ($this->_aReviews === null) {
351 $this->_aReviews =
false;
353 $this->_aReviews = $oObject->getReviews();
367 if ($this->_oRecommList === null) {
368 $this->_oRecommList =
false;
370 $oRecommList =
oxNew(
'oxrecommlist');
371 $this->_oRecommList = $oRecommList->getRecommListsByIds(array($oProduct->getId()));
385 if ($this->_oActiveRecommItems === null) {
386 $this->_oActiveRecommItems =
false;
390 $iActPage = ($iActPage < 0) ? 0 : $iActPage;
393 $iNrofCatArticles = $this->
getConfig()->getConfigParam(
'iNrofCatArticles');
394 $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 10;
396 $oList = $oActiveRecommList->getArticles($iNrofCatArticles * $iActPage, $iNrofCatArticles);
398 if ($oList && $oList->count()) {
399 foreach ($oList as $oItem) {
400 $oItem->text = $oActiveRecommList->getArtDescription($oItem->getId());
402 $this->_oActiveRecommItems = $oList;
427 if ($this->_oPageNavigation === null) {
428 $this->_oPageNavigation =
false;
446 $sAddParams .=
'&recommid=' . $oActRecommList->getId();
462 $sParams .=
"&cnid={$sCnId}";
465 $sParams .=
"&anid={$sAnId}";
468 $sParams .=
"&listtype={$sListType}";
471 $sParams .=
"&recommid={$sRecommId}";