152 if (!$oConfig->getConfigParam(
"bl_perfLoadReviews")) {
165 if ($oActiveRecommList) {
166 if ($oList && $oList->count()) {
167 $this->_iAllArtCnt = $oActiveRecommList->getArtCount();
170 $iNrofCatArticles = $this->
getConfig()->getConfigParam(
'iNrofCatArticles');
171 $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 10;
172 $this->_iCntPages = round($this->_iAllArtCnt / $iNrofCatArticles + 0.49);
199 if ($dRating !== null) {
200 $dRating = (int) $dRating;
204 if ($dRating !== null && $dRating >= 1 && $dRating <= 5) {
205 $oRating =
oxNew(
'oxrating');
206 if ($oRating->allowRating($oRevUser->getId(), $sType, $oActObject->getId())) {
207 $oRating->oxratings__oxuserid =
new oxField($oRevUser->getId());
208 $oRating->oxratings__oxtype =
new oxField($sType);
209 $oRating->oxratings__oxobjectid =
new oxField($oActObject->getId());
210 $oRating->oxratings__oxrating =
new oxField($dRating);
213 $oActObject->addToRatingAverage($dRating);
215 $this->_blReviewSendStatus =
true;
219 if (($sReviewText = trim((
string )
oxRegistry::getConfig()->getRequestParameter(
'rvw_txt',
true)))) {
220 $oReview =
oxNew(
'oxreview');
221 $oReview->oxreviews__oxobjectid =
new oxField($oActObject->getId());
222 $oReview->oxreviews__oxtype =
new oxField($sType);
225 $oReview->oxreviews__oxuserid =
new oxField($oRevUser->getId());
226 $oReview->oxreviews__oxrating =
new oxField(($dRating !== null) ? $dRating : null);
229 $this->_blReviewSendStatus =
true;
242 if ($this->_oRevUser === null) {
243 $this->_oRevUser =
false;
244 $oUser =
oxNew(
"oxuser");
246 if ($sUserId = $oUser->getReviewUserId($this->getReviewUserHash())) {
248 if ($oUser->load($sUserId)) {
249 $this->_oRevUser = $oUser;
251 } elseif ($oUser = $this->
getUser()) {
253 $this->_oRevUser = $oUser;
278 if ($this->_oActObject === null) {
279 $this->_oActObject =
false;
282 $this->_oActObject = $oProduct;
284 $this->_oActObject = $oRecommList;
300 $sType =
'oxarticle';
303 $sType =
'oxrecommlist';
323 if ($this->_oActiveRecommList === null) {
324 $this->_oActiveRecommList =
false;
327 $oActiveRecommList =
oxNew(
'oxrecommlist');
328 if ($oActiveRecommList->load($sRecommId)) {
329 $this->_oActiveRecommList = $oActiveRecommList;
344 if ($this->_blRate === null) {
345 $this->_blRate =
false;
347 $oRating =
oxNew(
'oxrating');
348 $this->_blRate = $oRating->allowRating(
366 if ($this->_aReviews === null) {
367 $this->_aReviews =
false;
369 $this->_aReviews = $oObject->getReviews();
385 if ($this->_oRecommList === null) {
386 $this->_oRecommList =
false;
388 $oRecommList =
oxNew(
'oxrecommlist');
389 $this->_oRecommList = $oRecommList->getRecommListsByIds(array($oProduct->getId()));
405 if ($this->_oActiveRecommItems === null) {
406 $this->_oActiveRecommItems =
false;
410 $iActPage = ($iActPage < 0) ? 0 : $iActPage;
413 $iNrofCatArticles = $this->
getConfig()->getConfigParam(
'iNrofCatArticles');
414 $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 10;
416 $oList = $oActiveRecommList->getArticles($iNrofCatArticles * $iActPage, $iNrofCatArticles);
418 if ($oList && $oList->count()) {
419 foreach ($oList as $oItem) {
420 $oItem->text = $oActiveRecommList->getArtDescription($oItem->getId());
422 $this->_oActiveRecommItems = $oList;
447 if ($this->_oPageNavigation === null) {
448 $this->_oPageNavigation =
false;
469 $sAddParams .=
'&recommid=' . $oActRecommList->getId();
486 $sParams .=
"&cnid={$sCnId}";
489 $sParams .=
"&anid={$sAnId}";
492 $sParams .=
"&listtype={$sListType}";
496 $sParams .=
"&recommid={$sRecommId}";