21 protected $_aComponentNames = array(
'oxcmp_cur' => 1,
'oxcmp_shop' => 1,
'oxcmp_basket' => 1,
'oxcmp_user' => 1);
226 if ($sParentId && $this->_oParentProd === null) {
227 $this->_oParentProd =
false;
228 $oProduct =
oxNew(
'oxArticle');
229 if (($oProduct->load($sParentId))) {
231 $this->_oParentProd = $oProduct;
259 $oProduct->appendLink($sAddParams);
270 return $this->
getConfig()->getConfigParam(
'bl_perfLoadReviews');
280 if ($this->_blCanRate === null) {
282 $this->_blCanRate =
false;
286 $oRating =
oxNew(
'oxrating');
287 $this->_blCanRate = $oRating->allowRating($oUser->getId(),
'oxarticle', $this->
getProduct()->getId());
301 if ($oUser = $this->
getUser()) {
316 if ($this->_aAttributes === null) {
318 $aArtAttributes = $this->
getProduct()->getAttributes();
321 $this->_aAttributes =
false;
323 if (count($aArtAttributes)) {
324 foreach ($aArtAttributes as $sKey => $oAttribute) {
325 $this->_aAttributes[$sKey] =
new stdClass();
326 $this->_aAttributes[$sKey]->title = $oAttribute->oxattribute__oxtitle->value;
327 $this->_aAttributes[$sKey]->value = $oAttribute->oxattribute__oxvalue->value;
340 public function getTagCloudManager()
343 $oTagList =
oxNew(
"oxArticleTagList");
345 $oTagList->setArticleId($this->
getProduct()->getId());
346 $oTagCloud =
oxNew(
"oxTagCloud");
347 $oTagCloud->setTagList($oTagList);
348 $oTagCloud->setExtendedMode(
true);
361 if ($this->_blCanEditTags === null) {
362 $this->_blCanEditTags =
false;
364 $this->_blCanEditTags =
true;
378 if ($this->_iLinkType === null) {
380 if (
'vendor' == $sListType) {
382 } elseif (
'manufacturer' == $sListType) {
384 } elseif (
'tag' == $sListType) {
386 } elseif (
'recommlist' == $sListType) {
410 if (is_object($oList)) {
411 $oList = clone $oList;
415 if (isset($oList[$sOxId])) {
416 unset($oList[$sOxId]);
430 if ($this->_aVariantList === null) {
434 if ($oParent = $oProduct->getParentArticle()) {
437 $oParent->setNoVariantLoading(
false);
438 $this->_aVariantList = $oParent->getFullVariants(
false);
441 if (count($this->_aVariantList) &&
$myConfig->getConfigParam(
'blVariantParentBuyable')) {
443 $oParent->enablePriceLoad();
444 $oParent->aSelectlist = $oParent->getSelectLists();
445 $this->_aVariantList = array_merge(array($oParent), $this->_aVariantList->getArray());
449 $this->_aVariantList = $oProduct->getFullVariants(
false);
453 foreach ($this->_aVariantList as $oVariant) {
480 if ($this->_oCaptcha === null) {
481 $this->_oCaptcha =
oxNew(
'oxCaptcha');
494 if ($this->_aMediaFiles === null) {
495 $aMediaFiles = $this->
getProduct()->getMediaUrls();
496 $this->_aMediaFiles = count($aMediaFiles) ? $aMediaFiles :
false;
511 if ($this->_aLastProducts === null) {
514 $sParentIdField =
'oxarticles__oxparentid';
515 $sArtId = $oProduct->$sParentIdField->value ? $oProduct->$sParentIdField->value : $oProduct->getId();
517 $oHistoryArtList =
oxNew(
'oxArticleList');
518 $oHistoryArtList->loadHistoryArticles($sArtId, $iCnt);
519 $this->_aLastProducts = $oHistoryArtList;
532 if ($this->_oManufacturer === null) {
533 $this->_oManufacturer = $this->
getProduct()->getManufacturer(
false);
546 if ($this->_oVendor === null) {
547 $this->_oVendor = $this->
getProduct()->getVendor(
false);
560 if ($this->_oCategory === null) {
561 $this->_oCategory = $this->
getProduct()->getCategory();
574 if ($this->_aPicGallery === null) {
591 return $aPicGallery[
'ActPic'];
603 return $aPicGallery[
'MorePics'];
615 return $aPicGallery[
'Icons'];
627 return $aPicGallery[
'ZoomPic'];
639 return $aPicGallery[
'ZoomPics'];
649 if ($this->_aReviews === null) {
650 $this->_aReviews =
false;
651 if ($this->
getConfig()->getConfigParam(
'bl_perfLoadReviews')) {
652 $this->_aReviews = $this->
getProduct()->getReviews();
666 if ($this->_oCrossSelling === null) {
667 $this->_oCrossSelling =
false;
669 $this->_oCrossSelling = $oProduct->getCrossSelling();
683 if ($this->_oSimilarProducts === null) {
684 $this->_oSimilarProducts =
false;
686 $this->_oSimilarProducts = $oProduct->getSimilarProducts();
700 if ($this->_aSimilarRecommListIds === null) {
701 $this->_aSimilarRecommListIds =
false;
704 $this->_aSimilarRecommListIds = array($oProduct->getId());
718 if ($this->_oAccessoires === null) {
719 $this->_oAccessoires =
false;
721 $this->_oAccessoires = $oProduct->getAccessoires();
735 if ($this->_aAlsoBoughtArts === null) {
736 $this->_aAlsoBoughtArts =
false;
738 $this->_aAlsoBoughtArts = $oProduct->getCustomerAlsoBoughtThisProducts();
754 $sFixedPriceField =
'oxarticles__oxblfixedprice';
755 if (isset($oProduct->$sFixedPriceField->value) && $oProduct->$sFixedPriceField->value) {
792 $this->_sSearchTitle = $sTitle;
802 $this->_sCatTreePath = $sActCatPath;
814 return $oProduct->oxarticles__oxisconfigurable->value;
825 if ($this->_dRatingValue === null) {
826 $this->_dRatingValue = (double) 0;
828 $blShowVariantsReviews = $this->
getConfig()->getConfigParam(
'blShowVariantReviews');
829 $this->_dRatingValue = round($oDetailsProduct->getArticleRatingAverage($blShowVariantsReviews), 1);
843 return $this->
getConfig()->getConfigParam(
'bl_perfLoadReviews');
853 if ($this->_iRatingCnt === null) {
854 $this->_iRatingCnt =
false;
856 $blShowVariantsReviews = $this->
getConfig()->getConfigParam(
'blShowVariantReviews');
857 $this->_iRatingCnt = $oDetailsProduct->getArticleRatingCount($blShowVariantsReviews);
881 if ($this->_sBidPrice === null) {
882 $this->_sBidPrice =
false;
885 $oCur = $this->
getConfig()->getActShopCurrencyObject();
902 $sParentIdField =
'oxarticles__oxparentid';
905 return $oParent->getVariantSelections($sVarSelId, $oProduct->getId());
919 if ($aVariantSelections && $aVariantSelections[
'oActiveVariant'] && !$aVariantSelections[
'blPerfectFit']) {
920 return $aVariantSelections[
'oActiveVariant'];
936 if ($this->_oProduct === null) {
943 $myConfig->setConfigParam(
'blLoadVariants',
true);
948 $this->_oProduct =
oxNew(
'oxarticle');
950 if (!$this->_oProduct->load($sOxid)) {
951 $myUtils->redirect(
$myConfig->getShopHomeURL());
952 $myUtils->showMessageAndExit(
'');
956 $aVarSelections = $this->_oProduct->getVariantSelections($sVarSelId);
957 if ($aVarSelections && $aVarSelections[
'oActiveVariant'] && $aVarSelections[
'blPerfectFit']) {
958 $this->_oProduct = $aVarSelections[
'oActiveVariant'];
962 if (!$this->_blIsInitialized) {
975 if ($sSortingParameters) {
976 list($sSortBy, $sSortDir) = explode(
'|', $sSortingParameters);
993 $oCategory =
oxNew(
'oxCategory');
998 if (!$sCatId && $oProduct->getCategory()) {
999 $oCategory = $oProduct->getCategory();
1001 $oCategory->load($sCatId);
1011 $oLocator->setLocatorData($oProduct, $this);
1024 if ($this->_blMdView === null) {
1025 $this->_blMdView =
false;
1026 if ($this->
getConfig()->getConfigParam(
'blUseMultidimensionVariants')) {
1027 $iMaxMdDepth = $this->
getProduct()->getMdVariants()->getMaxDepth();
1028 $this->_blMdView = ($iMaxMdDepth > 1);
1042 $sSeparator = $this->
getConfig()->getConfigParam(
"sTagSeparator");
1056 if (!$this->_oProduct->isVisible()) {
1057 $blContinue =
false;
1058 } elseif ($this->_oProduct->oxarticles__oxparentid->value) {
1059 $oParent = $this->
_getParentProduct($this->_oProduct->oxarticles__oxparentid->value);
1060 if (!$oParent || !$oParent->isVisible()) {
1061 $blContinue =
false;
1066 $myUtils->redirect(
$myConfig->getShopHomeURL());
1067 $myUtils->showMessageAndExit(
'');
1071 $this->_blIsInitialized =
true;
1086 if ($sSortBy = $oCategory->getDefaultSorting()) {
1087 $sSortDir = ($oCategory->getDefaultSortingMode()) ?
"desc" :
"asc";
1088 $aSorting = array(
'sortby' => $sSortBy,
'sortdir' => $sSortDir);