21 protected $_aComponentNames = array(
'oxcmp_cur' => 1,
'oxcmp_shop' => 1,
'oxcmp_basket' => 1,
'oxcmp_user' => 1 );
205 if ( $sParentId && $this->_oParentProd === null ) {
206 $this->_oParentProd =
false;
207 $oProduct =
oxNew(
'oxArticle' );
208 if ( ( $oProduct->load( $sParentId ) ) ) {
210 $this->_oParentProd = $oProduct;
239 $oProduct->appendLink( $sAddParams );
250 return $this->
getConfig()->getConfigParam(
'bl_perfLoadReviews' );
260 if ( $this->_blCanRate === null ) {
262 $this->_blCanRate =
false;
266 $oRating =
oxNew(
'oxrating' );
267 $this->_blCanRate = $oRating->allowRating( $oUser->getId(),
'oxarticle', $this->
getProduct()->getId() );
281 if ( $oUser = $this->
getUser() ) {
295 if ( $this->_aAttributes === null ) {
297 $aArtAttributes = $this->
getProduct()->getAttributes();
300 $this->_aAttributes =
false;
302 if ( count( $aArtAttributes ) ) {
303 foreach ( $aArtAttributes as $sKey => $oAttribute ) {
304 $this->_aAttributes[$sKey] =
new stdClass();
305 $this->_aAttributes[$sKey]->title = $oAttribute->oxattribute__oxtitle->value;
306 $this->_aAttributes[$sKey]->value = $oAttribute->oxattribute__oxvalue->value;
320 $oManager =
oxNew(
"oxTagCloud" );
321 $oManager->setExtendedMode(
true );
322 $oManager->setProductId( $this->
getProduct()->getId() );
334 if ( $this->_blCanEditTags === null ) {
335 $this->_blCanEditTags =
false;
337 $this->_blCanEditTags =
true;
350 if ( $this->_iLinkType === null ) {
352 if (
'vendor' == $sListType ) {
354 } elseif (
'manufacturer' == $sListType ) {
356 } elseif (
'tag' == $sListType ) {
358 } elseif (
'recommlist' == $sListType ) {
382 if (is_object($oList)) {
383 $oList = clone $oList;
387 if (isset($oList[$sOxId])) {
388 unset($oList[$sOxId]);
401 if ( $this->_aVariantList === null ) {
405 if ( $oParent = $oProduct->getParentArticle() ) {
408 $oParent->setNoVariantLoading(
false);
409 $this->_aVariantList = $oParent->getFullVariants(
false );
412 if ( count( $this->_aVariantList ) &&
$myConfig->getConfigParam(
'blVariantParentBuyable' ) ) {
414 $oParent->enablePriceLoad();
415 $oParent->aSelectlist = $oParent->getSelectLists();
416 $this->_aVariantList = array_merge( array( $oParent ), $this->_aVariantList->getArray() );
420 $this->_aVariantList = $oProduct->getFullVariants(
false );
424 foreach ( $this->_aVariantList as $oVariant ) {
451 if ( $this->_oCaptcha === null ) {
452 $this->_oCaptcha =
oxNew(
'oxCaptcha');
464 if ( $this->_aMediaFiles === null ) {
465 $aMediaFiles = $this->
getProduct()->getMediaUrls();
466 $this->_aMediaFiles = count($aMediaFiles) ? $aMediaFiles :
false;
480 if ( $this->_aLastProducts === null ) {
483 $sArtId = $oProduct->oxarticles__oxparentid->value?$oProduct->oxarticles__oxparentid->value:$oProduct->getId();
485 $oHistoryArtList =
oxNew(
'oxArticleList' );
486 $oHistoryArtList->loadHistoryArticles( $sArtId, $iCnt );
487 $this->_aLastProducts = $oHistoryArtList;
499 if ( $this->_oManufacturer === null ) {
500 $this->_oManufacturer = $this->
getProduct()->getManufacturer(
false );
512 if ( $this->_oVendor === null ) {
513 $this->_oVendor = $this->
getProduct()->getVendor(
false );
525 if ( $this->_oCategory === null ) {
526 $this->_oCategory = $this->
getProduct()->getCategory();
538 if ( $this->_aPicGallery === null ) {
553 return $aPicGallery[
'ActPic'];
564 return $aPicGallery[
'MorePics'];
575 return $aPicGallery[
'Icons'];
586 return $aPicGallery[
'ZoomPic'];
597 return $aPicGallery[
'ZoomPics'];
607 if ( $this->_aReviews === null ) {
608 $this->_aReviews =
false;
609 if ( $this->
getConfig()->getConfigParam(
'bl_perfLoadReviews' ) ) {
610 $this->_aReviews = $this->
getProduct()->getReviews();
623 if ( $this->_oCrossSelling === null ) {
624 $this->_oCrossSelling =
false;
626 $this->_oCrossSelling = $oProduct->getCrossSelling();
639 if ( $this->_oSimilarProducts === null ) {
640 $this->_oSimilarProducts =
false;
642 $this->_oSimilarProducts = $oProduct->getSimilarProducts();
655 if ( $this->_aSimilarRecommListIds === null ) {
656 $this->_aSimilarRecommListIds =
false;
659 $this->_aSimilarRecommListIds = array( $oProduct->getId() );
672 if ( $this->_oAccessoires === null ) {
673 $this->_oAccessoires =
false;
675 $this->_oAccessoires = $oProduct->getAccessoires();
688 if ( $this->_aAlsoBoughtArts === null ) {
689 $this->_aAlsoBoughtArts =
false;
691 $this->_aAlsoBoughtArts = $oProduct->getCustomerAlsoBoughtThisProducts();
706 if ( isset( $oProduct->oxarticles__oxblfixedprice->value ) && $oProduct->oxarticles__oxblfixedprice->value ) {
744 $this->_sSearchTitle = $sTitle;
756 $this->_sCatTreePath = $sActCatPath;
767 return $oProduct->oxarticles__oxisconfigurable->value;
778 if ( $this->_dRatingValue === null ) {
779 $this->_dRatingValue = (double) 0;
781 $this->_dRatingValue = round( $oDetailsProduct->getArticleRatingAverage( $this->getConfig()->getConfigParam(
'blShowVariantReviews' ) ), 1);
795 return $this->
getConfig()->getConfigParam(
'bl_perfLoadReviews' );
805 if ( $this->_iRatingCnt === null ) {
806 $this->_iRatingCnt =
false;
808 $this->_iRatingCnt = $oDetailsProduct->getArticleRatingCount( $this->
getConfig()->getConfigParam(
'blShowVariantReviews' ) );
831 if ( $this->_sBidPrice === null ) {
832 $this->_sBidPrice =
false;
835 $oCur = $this->
getConfig()->getActShopCurrencyObject();
851 if ( ( $oParent = $this->
_getParentProduct( $oProduct->oxarticles__oxparentid->value ) ) ) {
866 if ($aVariantSelections && $aVariantSelections[
'oActiveVariant'] && !$aVariantSelections[
'blPerfectFit']) {
867 return $aVariantSelections[
'oActiveVariant'];
882 if ( $this->_oProduct === null ) {
889 $myConfig->setConfigParam(
'blLoadVariants',
true );
894 $this->_oProduct =
oxNew(
'oxarticle' );
896 if ( !$this->_oProduct->load( $sOxid ) ) {
897 $myUtils->redirect(
$myConfig->getShopHomeURL() );
898 $myUtils->showMessageAndExit(
'' );
902 if ($aVariantSelections && $aVariantSelections[
'oActiveVariant'] && $aVariantSelections[
'blPerfectFit']) {
903 $this->_oProduct = $aVariantSelections[
'oActiveVariant'];
907 if ( !$this->_blIsInitialized ) {
922 if ( $sSortingParameters ) {
923 list( $sSortBy, $sSortDir ) = explode(
'|', $sSortingParameters );
940 $oCategory =
oxNew(
'oxCategory' );
945 if ( !$sCatId && $oProduct->getCategory() ) {
946 $oCategory = $oProduct->getCategory();
948 $oCategory->load( $sCatId );
958 $oLocator->setLocatorData( $oProduct, $this );
970 if ( $this->_blMdView === null ) {
971 $this->_blMdView =
false;
972 if ( $this->
getConfig()->getConfigParam(
'blUseMultidimensionVariants' ) ) {
973 $iMaxMdDepth = $this->
getProduct()->getMdVariants()->getMaxDepth();
974 $this->_blMdView = ($iMaxMdDepth > 1);
988 $sSeparator = $this->
getConfig()->getConfigParam(
"sTagSeparator");
1003 if ( !$this->_oProduct->isVisible() ) {
1004 $blContinue =
false;
1005 } elseif ( $this->_oProduct->oxarticles__oxparentid->value ) {
1006 $oParent = $this->
_getParentProduct( $this->_oProduct->oxarticles__oxparentid->value );
1007 if ( !$oParent || !$oParent->isVisible() ) {
1008 $blContinue =
false;
1012 if ( !$blContinue ) {
1013 $myUtils->redirect(
$myConfig->getShopHomeURL() );
1014 $myUtils->showMessageAndExit(
'' );
1018 $this->_blIsInitialized =
true;
1032 if ( $sSortBy = $oCategory->getDefaultSorting() ) {
1033 $sSortDir = ( $oCategory->getDefaultSortingMode() ) ?
"desc" :
"asc";
1034 $aSorting = array (
'sortby' => $sSortBy,
'sortdir' => $sSortDir );