00001 <?php
00002
00009 class Details extends oxUBase
00010 {
00016 protected $_aVariantList = null;
00017
00023 protected $_sThisTemplate = 'details.tpl';
00024
00030 protected $_oParent = null;
00031
00037 protected $_blCanRate = null;
00038
00043 protected $_blShowSorting = true;
00044
00049 protected $_blEditTags = null;
00050
00055 protected $_aTags = null;
00056
00061 protected $_sTagCloud = null;
00062
00067 protected $_aUserRecommList = null;
00068
00073 protected $_sLoginFormAnchor = null;
00074
00079 protected $_oCaptcha = null;
00080
00085 protected $_aMediaFiles = null;
00086
00091 protected $_aLastProducts = null;
00092
00097 protected $_oVendor = null;
00098
00103 protected $_oManufacturer = null;
00104
00109 protected $_oCategory = null;
00110
00115 protected $_aAttributes = null;
00116
00121 protected $_sParentName = null;
00122
00127 protected $_sParentUrl = null;
00128
00133 protected $_aPicGallery = null;
00134
00139 protected $_aSelectLists = null;
00140
00145 protected $_aReviews = null;
00146
00151 protected $_oCrossSelling = null;
00152
00157 protected $_oSimilarProducts = null;
00158
00163 protected $_oRecommList = null;
00164
00169 protected $_oAccessoires = null;
00170
00175 protected $_aAlsoBoughtArts = null;
00176
00181 protected $_sSearchTitle = null;
00182
00188 protected $_blIsInitialized = false;
00189
00195 protected $_iLinkType = null;
00196
00204 protected function _getParentProduct( $sParentId )
00205 {
00206 if ( $sParentId && $this->_oParent === null ) {
00207 $this->_oParent = false;
00208 if ( ( $oParent = oxNewArticle( $sParentId ) ) ) {
00209 $this->_oParent = $oParent;
00210 }
00211 }
00212 return $this->_oParent;
00213 }
00214
00221 public function loadVariantInformation()
00222 {
00223 if ( $this->_aVariantList === null ) {
00224 $oProduct = $this->getProduct();
00225
00226
00227 $this->_aVariantList = $oProduct->getVariants( false );
00228
00229
00230 if ( ( $oParent = $this->_getParentProduct( $oProduct->oxarticles__oxparentid->value ) ) && count( $this->_aVariantList ) == 0 ) {
00231 $myConfig = $this->getConfig();
00232
00233 $this->_aVariantList = $oParent->getVariants( false );
00234
00235
00236 if ( $oParent->blNotBuyableParent ) {
00237 $oParent->blNotBuyable = true;
00238 }
00239
00240
00241 if ( $myConfig->getConfigParam( 'blVariantParentBuyable' ) ) {
00242
00243 $oParent->aSelectlist = $oParent->getSelectLists();
00244 $this->_aVariantList = array_merge( array( $oParent ), $this->_aVariantList->getArray() );
00245 }
00246
00247
00248 if ( isset( $this->_aVariantList[$oProduct->getId()] ) ) {
00249 unset( $this->_aVariantList[$oProduct->getId()] );
00250 }
00251 }
00252
00253
00254 foreach ( $this->_aVariantList as $oVariant ) {
00255 $oVariant->setLinkType( $this->getLinkType() );
00256 }
00257
00258 }
00259 return $this->_aVariantList;
00260 }
00261
00267 public function getViewId()
00268 {
00269 if ( isset( $this->_sViewId )) {
00270 return $this->_sViewId;
00271 }
00272
00273 $sViewId = parent::getViewId().'|'.oxConfig::getParameter( 'anid' ).'|'.count( $this->getVariantList() ).'|';
00274
00275
00276 return $this->_sViewId = $sViewId;
00277 }
00278
00279
00286 public function init()
00287 {
00288 parent::init();
00289
00290 $oProduct = $this->getProduct();
00291
00292
00293 if ( $oProduct->oxarticles__oxtemplate->value ) {
00294 $this->_sThisTemplate = $oProduct->oxarticles__oxtemplate->value;
00295 }
00296
00297 if ( ( $sTplName = oxConfig::getParameter( 'tpl' ) ) ) {
00298 $this->_sThisTemplate = basename ( $sTplName );
00299 }
00300 }
00301
00321 public function render()
00322 {
00323 $myConfig = $this->getConfig();
00324
00325 $oProduct = $this->getProduct();
00326
00327
00328 $oProduct->loadAmountPriceInfo();
00329
00330
00331 $this->_aViewData['product'] = $oProduct;
00332
00333 $this->_aViewData["aTags"] = $this->getTags();
00334 $this->_aViewData["blEditTags"] = $this->getEditTags();
00335 startProfile("tagCloud");
00336 $this->_aViewData['tagCloud'] = $this->getTagCloud();
00337 stopProfile("tagCloud");
00338
00339 $this->_aViewData['loginformanchor'] = $this->getLoginFormAnchor();
00340
00341 $this->_aViewData['ispricealarm'] = $this->isPriceAlarm();
00342
00343 $this->_aViewData['customerwho'] = $this->getAlsoBoughtThiesProducts();
00344 $this->_aViewData['accessoirelist'] = $this->getAccessoires();
00345 $this->_aViewData['similarlist'] = $this->getSimilarProducts();
00346 $this->_aViewData['crossselllist'] = $this->getCrossSelling();
00347
00348 $this->_aViewData['variants'] = $this->getVariantList();
00349
00350 $this->_aViewData['reviews'] = $this->getReviews();
00351
00352 $this->_aViewData['selectlist'] = $this->getSelectLists();
00353
00354 $this->_aViewData["actpicid"] = $this->getActPictureId();
00355 $this->_aViewData["actpic"] = $this->getActPicture();
00356 $this->_aViewData['blMorePic'] = $this->morePics();
00357 $this->_aViewData['ArtPics'] = $this->getPictures();
00358 $this->_aViewData['ArtIcons'] = $this->getIcons();
00359 $this->_aViewData['blZoomPic'] = $this->showZoomPics();
00360 $this->_aViewData['aZoomPics'] = $this->getZoomPics();
00361 $this->_aViewData['iZoomPic'] = $this->getActZoomPic();
00362
00363 $this->_aViewData['parentname'] = $this->getParentName();
00364 $this->_aViewData['parent_url'] = $this->getParentUrl();
00365 $this->_aViewData['draw_parent_url'] = $this->drawParentUrl();
00366
00367 $this->_aViewData['pgNr'] = $this->getActPage();
00368
00369 parent::render();
00370
00371 $this->_aViewData['allartattr'] = $this->getAttributes();
00372
00373
00374 $this->_aViewData['oCategory'] = $this->getCategory();
00375
00376 $this->_aViewData['oVendor'] = $this->getVendor();
00377
00378 $this->_aViewData['oManufacturer'] = $this->getManufacturer();
00379
00380 $this->_aViewData['aLastProducts'] = $this->getLastProducts();
00381
00382
00383 $oLocator = oxNew( 'oxlocator', $this->getListType() );
00384 $oLocator->setLocatorData( $oProduct, $this );
00385
00386
00387 $this->_aViewData['aMediaUrls'] = $this->getMediaFiles();
00388
00389 if (in_array('oxrss_recommlists', $myConfig->getConfigParam( 'aRssSelected' )) && $this->getSimilarRecommLists()) {
00390 $oRss = oxNew('oxrssfeed');
00391 $this->addRssFeed($oRss->getRecommListsTitle( $oProduct ), $oRss->getRecommListsUrl( $oProduct ), 'recommlists');
00392 }
00393
00394
00395
00396 $this->_aViewData['oCaptcha'] = $this->getCaptcha();
00397 $this->_aViewData['sSearchTitle'] = $this->getSearchTitle();
00398 $this->_aViewData['actCatpath'] = $this->getCatTreePath();
00399
00400 return $this->_sThisTemplate;
00401 }
00402
00414 protected function _prepareMetaDescription( $sMeta, $iLength = 200, $blDescTag = false )
00415 {
00416 if ( !$sMeta ) {
00417 $oProduct = $this->getProduct();
00418
00419 $sMeta = $oProduct->getArticleLongDesc()->value;
00420 $sMeta = str_replace( array( '<br>', '<br />', '<br/>' ), "\n", $sMeta );
00421 $sMeta = $oProduct->oxarticles__oxtitle->value.' - '.$sMeta;
00422 $sMeta = strip_tags( $sMeta );
00423 }
00424 return parent::_prepareMetaDescription( $sMeta, $iLength, $blDescTag );
00425 }
00426
00437 protected function _prepareMetaKeyword( $sKeywords, $blRemoveDuplicatedWords = true )
00438 {
00439 $myConfig = $this->getConfig();
00440
00441 if ( !$sKeywords ) {
00442 $oProduct = $this->getProduct();
00443 $aKeywords[] = trim( $this->getTitle() );
00444
00445 if ( $oCatTree = $this->getCategoryTree() ) {
00446 foreach ( $oCatTree->getPath() as $oCat ) {
00447 $aKeywords[] = trim( $oCat->oxcategories__oxtitle->value );
00448 }
00449 }
00450
00451 $sKeywords = implode( ", ", $aKeywords );
00452
00453
00454 if ( $sSearchKeys = trim( $oProduct->oxarticles__oxsearchkeys->value ) ) {
00455 $sSearchKeys = preg_replace( "/\s+/", ", ", $sSearchKeys );
00456 $sKeywords .= ", " . $sSearchKeys;
00457 }
00458 }
00459
00460 return parent::_prepareMetaKeyword( $sKeywords, false );
00461 }
00462
00468 public function canRate()
00469 {
00470 if ( $this->_blCanRate === null ) {
00471
00472 $this->_blCanRate = false;
00473 $myConfig = $this->getConfig();
00474
00475 if ( $myConfig->getConfigParam( 'bl_perfLoadReviews' ) &&
00476 $oUser = $this->getUser() ) {
00477
00478 $oRating = oxNew( 'oxrating' );
00479 $this->_blCanRate = $oRating->allowRating( $oUser->getId(), 'oxarticle', $this->getProduct()->getId() );
00480 }
00481 }
00482 return $this->_blCanRate;
00483 }
00484
00490 public function saveReview()
00491 {
00492 $sReviewText = trim( ( string ) oxConfig::getParameter( 'rvw_txt', true ) );
00493 $dRating = oxConfig::getParameter( 'artrating' );
00494 if ($dRating < 0 || $dRating > 5) {
00495 $dRating = null;
00496 }
00497
00498 $sArtId = oxConfig::getParameter( 'anid' );
00499 $sUserId = oxSession::getVar( 'usr' );
00500
00501
00502 if ( $dRating && $sUserId ) {
00503 $oProduct = $this->getProduct();
00504
00505 $oRating = oxNew( 'oxrating' );
00506 $blRate = $oRating->allowRating( $sUserId, 'oxarticle', $oProduct->getId());
00507 if ( $blRate) {
00508 $oRating->oxratings__oxuserid = new oxField($sUserId);
00509 $oRating->oxratings__oxtype = new oxField('oxarticle', oxField::T_RAW);
00510 $oRating->oxratings__oxobjectid = new oxField($sArtId);
00511 $oRating->oxratings__oxrating = new oxField($dRating);
00512 $oRating->save();
00513 $oProduct->addToRatingAverage( $dRating);
00514 } else {
00515 $dRating = null;
00516 }
00517 }
00518
00519 if ( $sReviewText && $sUserId ) {
00520 $oReview = oxNew( 'oxreview' );
00521 $oReview->oxreviews__oxobjectid = new oxField($sArtId);
00522 $oReview->oxreviews__oxtype = new oxField('oxarticle', oxField::T_RAW);
00523 $oReview->oxreviews__oxtext = new oxField($sReviewText, oxField::T_RAW);
00524 $oReview->oxreviews__oxlang = new oxField(oxLang::getInstance()->getBaseLanguage());
00525 $oReview->oxreviews__oxuserid = new oxField($sUserId);
00526 $oReview->oxreviews__oxrating = new oxField(( $dRating) ? $dRating : null);
00527 $oReview->save();
00528 }
00529 }
00530
00536 public function showLogin()
00537 {
00538 $this->_sThisTemplate = 'account_login.tpl';
00539 if ( $sAnchor = $this->getConfig()->getParameter("anchor") ) {
00540 $this->_sLoginFormAnchor = $sAnchor;
00541 }
00542 }
00543
00549 public function addToRecomm()
00550 {
00551 $sRecommText = trim( ( string ) oxConfig::getParameter( 'recomm_txt' ) );
00552 $sRecommList = oxConfig::getParameter( 'recomm' );
00553 $sArtId = oxConfig::getParameter( 'anid' );
00554
00555 if ( $sArtId ) {
00556 $oRecomm = oxNew( 'oxrecommlist' );
00557 $oRecomm->load( $sRecommList);
00558 $oRecomm->addArticle( $sArtId, $sRecommText );
00559 }
00560 }
00561
00567 public function addTags()
00568 {
00569 $sTag = $this->getConfig()->getParameter('newTags', true );
00570 $sTag .= " ".getStr()->html_entity_decode( $this->getConfig()->getParameter( 'highTags', true ) );
00571
00572 $oProduct = $this->getProduct();
00573 $oProduct->addTag( $sTag );
00574
00575
00576 $oTagHandler = oxNew( 'oxTagCloud' );
00577 $this->_sTagCloud = $oTagHandler->getTagCloud( $oProduct->getId() );
00578 }
00579
00585 public function editTags()
00586 {
00587 $oTagCloud = oxNew("oxTagCloud");
00588 $this->_aTags = $oTagCloud->getTags( $this->getProduct()->getId() );
00589 $this->_blEditTags = true;
00590 }
00591
00597 protected function _getSeoObjectId()
00598 {
00599 if ( $oProduct = $this->getProduct() ) {
00600 return $oProduct->getId();
00601 }
00602 }
00603
00609 public function getAttributes()
00610 {
00611 if ( $this->_aAttributes === null ) {
00612
00613 $aArtAttributes = $this->getProduct()->getAttributes();
00614
00615
00616 $this->_aAttributes = array();
00617 if ( count( $aArtAttributes ) ) {
00618 foreach ( $aArtAttributes as $sKey => $oAttribute ) {
00619 $this->_aAttributes[$sKey] = new stdClass();
00620 $this->_aAttributes[$sKey]->title = $oAttribute->oxattribute__oxtitle->value;
00621 $this->_aAttributes[$sKey]->value = $oAttribute->oxattribute__oxvalue->value;
00622 }
00623 }
00624 }
00625
00626 return $this->_aAttributes;
00627 }
00628
00629
00635 public function getEditTags()
00636 {
00637 return $this->_blEditTags;
00638 }
00639
00645 public function getTags()
00646 {
00647 return $this->_aTags;
00648 }
00649
00655 public function getTagCloud()
00656 {
00657 if ( $this->_sTagCloud === null ) {
00658 $this->_sTagCloud = false;
00659 $oTagHandler = oxNew('oxTagCloud');
00660 $this->_sTagCloud = $oTagHandler->getTagCloud($this->getProduct()->getId());
00661 }
00662 return $this->_sTagCloud;
00663 }
00664
00665
00671 public function getLoginFormAnchor()
00672 {
00673 return $this->_sLoginFormAnchor;
00674 }
00675
00681 public function getProduct()
00682 {
00683 $myConfig = $this->getConfig();
00684 $myUtils = oxUtils::getInstance();
00685
00686 if ( $this->_oProduct === null ) {
00687
00688
00689
00690 $myConfig->setConfigParam( 'blLoadVariants', true );
00691
00692 $sOxid = oxConfig::getParameter( 'anid' );
00693
00694
00695 $this->_oProduct = oxNew( 'oxarticle' );
00696 $this->_oProduct->setSkipAbPrice( true );
00697
00698 if ( !$this->_oProduct->load( $sOxid ) ) {
00699 $myUtils->redirect( $myConfig->getShopHomeURL() );
00700 $myUtils->showMessageAndExit( '' );
00701 }
00702 }
00703
00704
00705 if ( !$this->_blIsInitialized ) {
00706 if ( !$this->_oProduct->isVisible() ) {
00707 $myUtils->redirect( $myConfig->getShopHomeURL() );
00708 $myUtils->showMessageAndExit( '' );
00709 }
00710
00711 $this->_oProduct->setLinkType( $this->getLinkType() );
00712 $this->_blIsInitialized = true;
00713 }
00714
00715 return $this->_oProduct;
00716 }
00717
00725 public function getLinkType()
00726 {
00727 if ( $this->_iLinkType === null ) {
00728 $sListType = oxConfig::getParameter( 'listtype' );
00729 if ( 'vendor' == $sListType ) {
00730 $this->_iLinkType = OXARTICLE_LINKTYPE_VENDOR;
00731 } elseif ( 'manufacturer' == $sListType ) {
00732 $this->_iLinkType = OXARTICLE_LINKTYPE_MANUFACTURER;
00733 } elseif ( 'tag' == $sListType ) {
00734 $this->_iLinkType = OXARTICLE_LINKTYPE_TAG;
00735 } else {
00736 $this->_iLinkType = OXARTICLE_LINKTYPE_CATEGORY;
00737
00738
00739 if ( ( $oCat = $this->getCategory() ) && $oCat->isPriceCategory() ) {
00740 $this->_iLinkType = OXARTICLE_LINKTYPE_PRICECATEGORY;
00741 }
00742 }
00743 }
00744
00745 return $this->_iLinkType;
00746 }
00747
00753 public function getVariantList()
00754 {
00755 return $this->loadVariantInformation();
00756 }
00757
00763 public function getCaptcha()
00764 {
00765 if ( $this->_oCaptcha === null ) {
00766 $this->_oCaptcha = oxNew('oxCaptcha');
00767 }
00768 return $this->_oCaptcha;
00769 }
00770
00776 public function getMediaFiles()
00777 {
00778 if ( $this->_aMediaFiles === null ) {
00779 $aMediaFiles = $this->getProduct()->getMediaUrls();
00780 $this->_aMediaFiles = count($aMediaFiles) ? $aMediaFiles : false;
00781 }
00782 return $this->_aMediaFiles;
00783 }
00784
00790 public function getLastProducts()
00791 {
00792 if ( $this->_aLastProducts === null ) {
00793
00794 $oProduct = $this->getProduct();
00795 $sArtId = $oProduct->oxarticles__oxparentid->value?$oProduct->oxarticles__oxparentid->value:$oProduct->getId();
00796
00797 $oHistoryArtList = oxNew( 'oxarticlelist' );
00798 $oHistoryArtList->loadHistoryArticles( $sArtId );
00799 $this->_aLastProducts = $oHistoryArtList;
00800 }
00801 return $this->_aLastProducts;
00802 }
00803
00809 public function getVendor()
00810 {
00811 if ( $this->_oVendor === null ) {
00812 $this->_oVendor = $this->getProduct()->getVendor( false );
00813 }
00814 return $this->_oVendor;
00815 }
00816
00822 public function getManufacturer()
00823 {
00824 if ( $this->_oManufacturer === null ) {
00825 $this->_oManufacturer = $this->getProduct()->getManufacturer( false );
00826 }
00827 return $this->_oManufacturer;
00828 }
00829
00835 public function getCategory()
00836 {
00837 if ( $this->_oCategory === null ) {
00838 $this->_oCategory = $this->getProduct()->getCategory();
00839 }
00840 return $this->_oCategory;
00841 }
00842
00848 public function drawParentUrl()
00849 {
00850 if ( ( $oParent = $this->_getParentProduct( $this->getProduct()->oxarticles__oxparentid->value ) ) ) {
00851 if ( $this->getConfig()->getConfigParam( 'blVariantParentBuyable' ) || count( $this->getVariantList() ) > 0 ) {
00852 return true;
00853 }
00854 }
00855 }
00856
00862 public function getParentName()
00863 {
00864 if ( $this->_sParentName === null ) {
00865 $this->_sParentName = false;
00866 if ( ( $oParent = $this->_getParentProduct( $this->getProduct()->oxarticles__oxparentid->value ) ) ) {
00867 $this->_sParentName = $oParent->oxarticles__oxtitle->value;
00868 }
00869 }
00870 return $this->_sParentName;
00871 }
00872
00878 public function getParentUrl()
00879 {
00880 if ( $this->_sParentUrl === null ) {
00881 $this->_sParentUrl = false;
00882 if ( ( $oParent = $this->_getParentProduct( $this->getProduct()->oxarticles__oxparentid->value ) ) ) {
00883 $this->_sParentUrl = $oParent->getLink();
00884 }
00885 }
00886 return $this->_sParentUrl;
00887 }
00888
00894 public function getPictureGallery()
00895 {
00896 if ( $this->_aPicGallery === null ) {
00897
00898 $this->_aPicGallery = $this->getProduct()->getPictureGallery();
00899 }
00900 return $this->_aPicGallery;
00901 }
00902
00908 public function getActPictureId()
00909 {
00910 $aPicGallery = $this->getPictureGallery();
00911 return $aPicGallery['ActPicID'];
00912 }
00913
00919 public function getActPicture()
00920 {
00921 $aPicGallery = $this->getPictureGallery();
00922 return $aPicGallery['ActPic'];
00923 }
00924
00930 public function morePics()
00931 {
00932 $aPicGallery = $this->getPictureGallery();
00933 return $aPicGallery['MorePics'];
00934 }
00935
00941 public function getPictures()
00942 {
00943 $aPicGallery = $this->getPictureGallery();
00944 return $aPicGallery['Pics'];
00945 }
00946
00954 public function getArtPic( $sPicNr )
00955 {
00956 $aPicGallery = $this->getPictureGallery();
00957 return $aPicGallery['Pics'][$sPicNr];
00958 }
00959
00965 public function getIcons()
00966 {
00967 $aPicGallery = $this->getPictureGallery();
00968 return $aPicGallery['Icons'];
00969 }
00970
00976 public function showZoomPics()
00977 {
00978 $aPicGallery = $this->getPictureGallery();
00979 return $aPicGallery['ZoomPic'];
00980 }
00981
00987 public function getZoomPics()
00988 {
00989 $aPicGallery = $this->getPictureGallery();
00990 return $aPicGallery['ZoomPics'];
00991 }
00992
00998 public function getActZoomPic()
00999 {
01000 return 1;
01001 }
01002
01008 public function getSelectLists()
01009 {
01010 if ( $this->_aSelectLists === null ) {
01011 $this->_aSelectLists = false;
01012 if ( $this->getConfig()->getConfigParam( 'bl_perfLoadSelectLists' ) ) {
01013 $this->_aSelectLists = $this->getProduct()->getSelectLists();
01014 }
01015 }
01016 return $this->_aSelectLists;
01017 }
01018
01024 public function getReviews()
01025 {
01026 if ( $this->_aReviews === null ) {
01027 $this->_aReviews = false;
01028 if ( $this->getConfig()->getConfigParam( 'bl_perfLoadReviews' ) ) {
01029 $this->_aReviews = $this->getProduct()->getReviews();
01030 }
01031 }
01032 return $this->_aReviews;
01033 }
01034
01040 public function getCrossSelling()
01041 {
01042 if ( $this->_oCrossSelling === null ) {
01043 $this->_oCrossSelling = false;
01044 if ( $oProduct = $this->getProduct() ) {
01045 $this->_oCrossSelling = $oProduct->getCrossSelling();
01046 }
01047 }
01048 return $this->_oCrossSelling;
01049 }
01050
01056 public function getSimilarProducts()
01057 {
01058 if ( $this->_oSimilarProducts === null ) {
01059 $this->_oSimilarProducts = false;
01060 if ( $oProduct = $this->getProduct() ) {
01061 $this->_oSimilarProducts = $oProduct->getSimilarProducts();
01062 }
01063 }
01064 return $this->_oSimilarProducts;
01065 }
01066
01072 public function getSimilarRecommLists()
01073 {
01074 if ( $this->_oRecommList === null ) {
01075 $this->_oRecommList = false;
01076 if ( $oProduct = $this->getProduct() ) {
01077 $oRecommList = oxNew('oxrecommlist');
01078 $this->_oRecommList = $oRecommList->getRecommListsByIds( array( $oProduct->getId() ) );
01079 }
01080 }
01081 return $this->_oRecommList;
01082 }
01083
01089 public function getAccessoires()
01090 {
01091 if ( $this->_oAccessoires === null ) {
01092 $this->_oAccessoires = false;
01093 if ( $oProduct = $this->getProduct() ) {
01094 $this->_oAccessoires = $oProduct->getAccessoires();
01095 }
01096 }
01097 return $this->_oAccessoires;
01098 }
01099
01105 public function getAlsoBoughtThiesProducts()
01106 {
01107 if ( $this->_aAlsoBoughtArts === null ) {
01108 $this->_aAlsoBoughtArts = false;
01109 if ( $oProduct = $this->getProduct() ) {
01110 $this->_aAlsoBoughtArts = $oProduct->getCustomerAlsoBoughtThisProducts();
01111 }
01112 }
01113 return $this->_aAlsoBoughtArts;
01114 }
01115
01121 public function isPriceAlarm()
01122 {
01123
01124 $oProduct = $this->getProduct();
01125 if ( isset( $oProduct->oxarticles__oxblfixedprice->value ) && $oProduct->oxarticles__oxblfixedprice->value ) {
01126 return 0;
01127 }
01128 return 1;
01129 }
01130
01139 protected function _getSubject( $iLang )
01140 {
01141 return $this->getProduct();
01142 }
01143
01149 public function getSearchTitle()
01150 {
01151 return $this->_sSearchTitle;
01152 }
01153
01161 public function setSearchTitle( $sTitle )
01162 {
01163 $this->_sSearchTitle = $sTitle;
01164 }
01165
01173 public function setCatTreePath( $sActCatPath )
01174 {
01175 $this->_sCatTreePath = $sActCatPath;
01176 }
01177
01184 public function noIndex()
01185 {
01186 $sListType = oxConfig::getParameter( 'listtype' );
01187 if ( $sListType && ( 'vendor' == $sListType || 'manufacturer' == $sListType ) ) {
01188 return $this->_iViewIndexState = VIEW_INDEXSTATE_NOINDEXFOLLOW;
01189 }
01190 return parent::noIndex();
01191 }
01192
01198 public function getTitle()
01199 {
01200 if ( $oProduct = $this->getProduct() ) {
01201 return $oProduct->oxarticles__oxtitle->value . ( $oProduct->oxarticles__oxvarselect->value ? ' ' . $oProduct->oxarticles__oxvarselect->value : '' );
01202 }
01203 }
01204
01205
01211 public function getTag()
01212 {
01213 return oxConfig::getParameter("searchtag", 1);
01214 }
01215 }