00001 <?php
00002
00008 class oxCategory extends oxI18n
00009 {
00014 protected $_aSubCats = array();
00015
00020 protected $_aContentCats = array();
00021
00027 protected $_sClassName = 'oxcategory';
00028
00034 protected $_iNrOfArticles;
00035
00041 protected $_blIsVisible;
00042
00048 protected $_blExpanded;
00049
00055 protected $_blHasSubCats;
00056
00062 protected $_blHasVisibleSubCats;
00063
00069 protected $_blIsSeoObject = true;
00070
00076 protected $_blUseLazyLoading = false;
00077
00083 protected $_sDynImageDir = null;
00084
00090 protected $_blTopCategory = null;
00091
00097 protected $_aIds = array();
00098
00102 public function __construct()
00103 {
00104 parent::__construct();
00105 $this->init( 'oxcategories' );
00106 }
00107
00115 public function __get( $sName )
00116 {
00117 switch ( $sName ) {
00118 case 'aSubCats':
00119 return $this->_aSubCats;
00120
00121 case 'aContent':
00122 return $this->_aContentCats;
00123
00124 case 'iArtCnt':
00125 return $this->getNrOfArticles();
00126
00127 case 'isVisible':
00128 return $this->getIsVisible();
00129
00130 case 'expanded':
00131 return $this->getExpanded();
00132
00133 case 'hasSubCats':
00134 return $this->getHasSubCats();
00135
00136 case 'hasVisibleSubCats':
00137 return $this->getHasVisibleSubCats();
00138
00139 case 'openlink':
00140 case 'closelink':
00141 case 'link':
00142
00143
00144 return $this->getLink();
00145 case 'dimagedir':
00146 return $this->getPictureUrl();
00147 }
00148 return parent::__get($sName);
00149 }
00150
00158 public function assign( $dbRecord )
00159 {
00160
00161 parent::assign( $dbRecord );
00162
00163 startProfile("parseThroughSmarty");
00164
00165 $myConfig = $this->getConfig();
00166 if (!$this->_isInList() && !$this->isAdmin() && $myConfig->getConfigParam( 'bl_perfParseLongDescinSmarty' ) ) {
00167 $this->oxcategories__oxlongdesc = new oxField( oxUtilsView::getInstance()->parseThroughSmarty( $this->oxcategories__oxlongdesc->value, $this->getId() ), oxField::T_RAW );
00168 }
00169
00170 if ( !$this->isAdmin() && ( $myConfig->getConfigParam( 'bl_perfShowActionCatArticleCnt' ) || $myConfig->getConfigParam('blDontShowEmptyCategories') ) ) {
00171 if ( $this->oxcategories__oxpricefrom->value || $this->oxcategories__oxpriceto->value ) {
00172 $this->_iNrOfArticles = oxUtilsCount::getInstance()->getPriceCatArticleCount( $this->getId(), $this->oxcategories__oxpricefrom->value, $this->oxcategories__oxpriceto->value );
00173 } else {
00174 $this->_iNrOfArticles = oxUtilsCount::getInstance()->getCatArticleCount( $this->getId() );
00175 }
00176 }
00177
00178 stopProfile("parseThroughSmarty");
00179 }
00180
00188 public function delete( $sOXID = null)
00189 {
00190 if ( !$this->getId() ) {
00191 $this->load( $sOXID);
00192 }
00193
00194
00195 $myConfig = $this->getConfig();
00196 $oDB = oxDb::getDb();
00197 $blRet = false;
00198
00199 if ( $this->oxcategories__oxright->value == ($this->oxcategories__oxleft->value+1) ) {
00200 $myUtilsPic = oxUtilsPic::getInstance();
00201
00202
00203
00204 $myUtilsPic->safePictureDelete($this->oxcategories__oxthumb->value, $myConfig->getAbsDynImageDir().'/0', 'oxcategories', 'oxthumb' );
00205
00206 $myUtilsPic->safePictureDelete($this->oxcategories__oxicon->value, $myConfig->getAbsDynImageDir().'/icon', 'oxcategories', 'oxicon' );
00207
00208 $sAdd = " and oxshopid = '" . $this->getShopId() . "' ";
00209
00210 $oDB->execute( "UPDATE oxcategories SET OXLEFT = OXLEFT - 2
00211 WHERE OXROOTID = '".$this->oxcategories__oxrootid->value."'
00212 AND OXLEFT > ".$this->oxcategories__oxleft->value.$sAdd );
00213
00214 $oDB->execute( "UPDATE oxcategories SET OXRIGHT = OXRIGHT - 2
00215 WHERE OXROOTID = '".$this->oxcategories__oxrootid->value."'
00216 AND OXRIGHT > ".$this->oxcategories__oxright->value.$sAdd );
00217
00218
00219 $blRet = parent::delete();
00220
00221
00222 $oDB->execute( "delete from oxobject2category where oxobject2category.oxcatnid='".$this->oxcategories__oxid->value."' ");
00223
00224
00225 $oDB->execute( "delete from oxcategory2attribute where oxcategory2attribute.oxobjectid='".$this->oxcategories__oxid->value."' ");
00226
00227
00228
00229 $oDB->execute( "delete from oxobject2delivery where oxobject2delivery.oxobjectid='".$this->oxcategories__oxid->value."' ");
00230
00231 $oDB->execute( "delete from oxobject2discount where oxobject2discount.oxobjectid='".$this->oxcategories__oxid->value."' ");
00232
00233 oxSeoEncoderCategory::getInstance()->onDeleteCategory($this);
00234 }
00235 return $blRet;
00236 }
00237
00243 public function getSubCats()
00244 {
00245 return $this->_aSubCats;
00246 }
00247
00255 public function getSubCat($sKey)
00256 {
00257 return $this->_aSubCats[$sKey];
00258 }
00259
00267 public function setSubCats( $aCats )
00268 {
00269 $this->_aSubCats = $aCats;
00270
00271 foreach ( $aCats as $oCat ) {
00272 if ( $oCat->getIsVisible() ) {
00273 $this->setHasVisibleSubCats( true );
00274 }
00275 }
00276
00277 $this->sortSubCats();
00278 }
00279
00288 public function setSubCat($oCat, $sKey=null)
00289 {
00290 if ( $sKey ) {
00291 $this->_aSubCats[$sKey] = $oCat;
00292 } else {
00293 $this->_aSubCats[] = $oCat;
00294 }
00295
00296
00297 $oCat->setParentCategory( $this );
00298
00299 if ( $oCat->getIsVisible() ) {
00300 $this->setHasVisibleSubCats( true );
00301 }
00302
00303 $this->sortSubCats();
00304 }
00305
00311 public function sortSubCats()
00312 {
00313 if ( count( $this->_aIds ) > 0 ) {
00314 uasort($this->_aSubCats, array( $this, 'cmpCat' ) );
00315 }
00316 }
00317
00327 public function cmpCat( $a,$b )
00328 {
00329 if ( count( $this->_aIds ) == 0 ) {
00330 return;
00331 }
00332
00333 $sNumA = $this->_aIds[$a->oxcategories__oxid->value];
00334 $sNumB = $this->_aIds[$b->oxcategories__oxid->value];
00335
00336 if ($sNumA < $sNumB ) {
00337 return -1;
00338 } if ( $sNumA == $sNumB) {
00339 return 0;
00340 }
00341 return 1;
00342 }
00343
00351 public function setSortingIds( $aSorIds )
00352 {
00353 $this->_aIds = $aSorIds;
00354 }
00355
00361 public function getContentCats()
00362 {
00363 return $this->_aContentCats;
00364 }
00365
00373 public function setContentCats( $aContent )
00374 {
00375 $this->_aContentCats = $aContent;
00376 }
00377
00386 public function setContentCat( $oContent, $sKey=null )
00387 {
00388 if ( $sKey ) {
00389 $this->_aContentCats[$sKey] = $oContent;
00390 } else {
00391 $this->_aContentCats[] = $oContent;
00392 }
00393 }
00394
00400 public function getNrOfArticles()
00401 {
00402 if ( !$this->getConfig()->getConfigParam( 'bl_perfShowActionCatArticleCnt' ) && $this->getConfig()->getConfigParam( 'blDontShowEmptyCategories' ) ) {
00403 return 0;
00404 }
00405
00406 return $this->_iNrOfArticles;
00407 }
00408
00416 public function setNrOfArticles( $iNum )
00417 {
00418 $this->_iNrOfArticles = $iNum;
00419 }
00420
00426 public function getIsVisible()
00427 {
00428 if (!isset( $this->_blIsVisible ) ) {
00429
00430 if ( $this->getConfig()->getConfigParam( 'blDontShowEmptyCategories' ) ) {
00431 $blEmpty = ($this->_iNrOfArticles < 1) && !$this->getHasVisibleSubCats();
00432 } else {
00433 $blEmpty = false;
00434 }
00435
00436 $this->_blIsVisible = !($blEmpty || $this->oxcategories__oxhidden->value);
00437 }
00438
00439 return $this->_blIsVisible;
00440 }
00441
00449 public function setIsVisible( $blVisible )
00450 {
00451 $this->_blIsVisible = $blVisible;
00452 }
00453
00459 public function getPictureUrl()
00460 {
00461 if ( $this->_sDynImageDir === null ) {
00462 $sThisShop = $this->oxcategories__oxshopid->value;
00463 $this->_sDynImageDir = $this->getConfig()->getPictureUrl( null, false, null, null, $sThisShop);
00464 }
00465 return $this->_sDynImageDir;
00466 }
00467
00475 public function getLink($iLang = null)
00476 {
00477 if (isset($iLang)) {
00478 $iLang = (int) $iLang;
00479 if ($iLang == (int) $this->getLanguage()) {
00480 $iLang = null;
00481 }
00482 }
00483 if ( ($this->link === null ) || isset($iLang)) {
00484 if ( (!isset( $this->oxcategories__oxextlink->value ) || !$this->oxcategories__oxextlink->value ) &&
00485 oxUtils::getInstance()->seoIsActive() ) {
00486 $link = oxSeoEncoderCategory::getInstance()->getCategoryUrl( $this, $iLang );
00487 } else {
00488 $link = $this->getStdLink($iLang);
00489 }
00490
00491 if (isset($iLang)) {
00492 return $link;
00493 } else {
00494 $this->link = $link;
00495 }
00496 }
00497
00498 return $this->link;
00499 }
00500
00508 public function setLink( $sLink )
00509 {
00510 $this->link = $sLink;
00511 }
00512
00520 public function getSqlActiveSnippet( $blForceCoreTable = false )
00521 {
00522 $sTable = $this->getCoreTableName();
00523
00524 $sQ = parent::getSqlActiveSnippet( $blForceCoreTable );
00525 $sQ .= ( strlen( $sQ )? ' and ' : '' ) . " $sTable.oxhidden = '0' ";
00526
00527
00528 return "( $sQ ) ";
00529 }
00530
00538 public function getStdLink($iLang = null)
00539 {
00540 $sLink = '';
00541 if ( $this->oxcategories__oxextlink->value ) {
00542 return $this->getSession()->url( $this->oxcategories__oxextlink->value );
00543 } else {
00544 $sLink = $this->getConfig()->getShopHomeURL(). "cl=alist&cnid=" . $this->getId();
00545 }
00546
00547 if ( isset($iLang) && !oxUtils::getInstance()->seoIsActive() ) {
00548 $iLang = (int) $iLang;
00549 if ($iLang != (int) $this->getLanguage()) {
00550 $sLink .= "&lang={$iLang}";
00551 }
00552 }
00553
00554 return $sLink;
00555 }
00556
00562 public function getExpanded()
00563 {
00564 if ( !isset( $this->_blExpanded ) ) {
00565 $myConfig = $this->getConfig();
00566 $this->_blExpanded = ( $myConfig->getConfigParam( 'blLoadFullTree' ) && !$myConfig->getConfigParam( 'blTopNaviLayout' ) );
00567 }
00568
00569 return $this->_blExpanded;
00570 }
00571
00579 public function setExpanded( $blExpanded )
00580 {
00581 $this->_blExpanded = $blExpanded;
00582 }
00583
00589 public function getHasSubCats()
00590 {
00591 if ( !isset( $this->_blHasSubCats ) ) {
00592 $this->_blHasSubCats = $this->oxcategories__oxright->value > $this->oxcategories__oxleft->value + 1 ;
00593 }
00594
00595 return $this->_blHasSubCats;
00596 }
00597
00603 public function getHasVisibleSubCats()
00604 {
00605 if ( !isset( $this->_blHasVisibleSubCats ) ) {
00606 $this->_blHasVisibleSubCats = false;
00607 }
00608
00609 return $this->_blHasVisibleSubCats;
00610 }
00611
00619 public function setHasVisibleSubCats( $blHasVisibleSubcats )
00620 {
00621 $this->_blHasVisibleSubCats = $blHasVisibleSubcats;
00622 }
00623
00629 public function getAttributes()
00630 {
00631 $sActCat = $this->sOXID;
00632 $aAttributes = array();
00633 $blActiveFilter = false;
00634
00635 $aSessionFilter = oxSession::getVar( 'session_attrfilter' );
00636
00637 $oArtList = oxNew( "oxarticlelist");
00638 $oArtList->loadCategoryIDs( $sActCat, $aSessionFilter );
00639
00640
00641 if (count($oArtList) > 0 ) {
00642 $sArtIds = implode("','", array_keys($oArtList->getArray()) );
00643 $sAttTbl = getViewName('oxattribute');
00644 $sO2ATbl = getViewName('oxobject2attribute');
00645 $sC2ATbl = getViewName('oxcategory2attribute');
00646 $sLngSuf = oxLang::getInstance()->getLanguageTag($this->getLanguage());
00647
00648 $sSelect = "SELECT DISTINCT att.oxid, att.oxtitle{$sLngSuf}, o2a.oxvalue{$sLngSuf} ".
00649 "FROM $sAttTbl as att, $sO2ATbl as o2a ,$sC2ATbl as c2a ".
00650 "WHERE att.oxid = o2a.oxattrid AND c2a.oxobjectid = '{$sActCat}' AND c2a.oxattrid = att.oxid AND o2a.oxvalue{$sLngSuf} !='' AND o2a.oxobjectid IN ('$sArtIds') ".
00651 "ORDER BY c2a.oxsort , att.oxpos, att.oxtitle{$sLngSuf}, o2a.oxvalue{$sLngSuf}";
00652
00653 $rs = oxDb::getDb()->Execute( $sSelect);
00654 if ($rs != false && $rs->recordCount() > 0) {
00655 $oStr = getStr();
00656 while ( !$rs->EOF && list($sAttId,$sAttTitle, $sAttValue) = $rs->fields ) {
00657 if ( !isset( $aAttributes[$sAttId])) {
00658 $oAttribute = new stdClass();
00659 $oAttribute->title = $sAttTitle;
00660 $oAttribute->aValues = array();
00661 $aAttributes[$sAttId] = $oAttribute;
00662 }
00663 $oValue = new stdClass();
00664 $oValue->id = $oStr->htmlspecialchars( $sAttValue );
00665 $oValue->value = $oStr->htmlspecialchars( $sAttValue );
00666 $oValue->blSelected = isset($aSessionFilter[$sActCat][$sAttId]) && $aSessionFilter[$sActCat][$sAttId] == $sAttValue;
00667
00668 $sAttValueId = md5( $sAttValue );
00669
00670 $blActiveFilter = $blActiveFilter || $oValue->blSelected;
00671 $aAttributes[$sAttId]->aValues[$sAttValueId] = $oValue;
00672 $rs->moveNext();
00673 }
00674 }
00675
00676 }
00677
00678 if ( is_array($aSessionFilter[$sActCat]) && !$blActiveFilter ) {
00679 oxSession::setVar( "session_attrfilter", false);
00680 }
00681 return $aAttributes;
00682 }
00683
00691 public function getCatInLang( $oActCategory = null )
00692 {
00693 $oCategoryInDefaultLanguage= oxNew( "oxcategory" );
00694 if ( $this->oxcategories__oxpricefrom->value || $this->oxcategories__oxpriceto->value) {
00695
00696 $oCategoryInDefaultLanguage= oxNew( "oxcategory" );
00697 $oCategoryInDefaultLanguage->loadInLang( 0, $this->getId());
00698 } else {
00699 $oCategoryInDefaultLanguage= oxNew( "oxcategory" );
00700 $oCategoryInDefaultLanguage->loadInLang( 0, $oActCategory->getId());
00701 }
00702 return $oCategoryInDefaultLanguage;
00703 }
00704
00712 public function setParentCategory( $oCategory )
00713 {
00714 $this->_oParent = $oCategory;
00715 }
00716
00722 public function getParentCategory()
00723 {
00724 $oCat = null;
00725
00726
00727 if ( $this->oxcategories__oxparentid->value && $this->oxcategories__oxparentid->value != 'oxrootid' ) {
00728
00729
00730 if ( $this->_oParent ) {
00731 $oCat = $this->_oParent;
00732 } else {
00733 $oCat = oxNew( 'oxcategory' );
00734 if ( !$oCat->loadInLang( $this->getLanguage(), $this->oxcategories__oxparentid->value ) ) {
00735 $oCat = null;
00736 }
00737 }
00738 }
00739 return $oCat;
00740 }
00741
00749 public static function getRootId($sCategoryId)
00750 {
00751 if ( !isset( $sCategoryId ) ) {
00752 return;
00753 }
00754
00755 return oxDb::getDb()->getOne( 'select oxrootid from '.getViewName('oxcategories').' where oxid = ?', array( $sCategoryId ) );
00756 }
00757
00758
00766 public function assignViewableRecord($sSelect)
00767 {
00768 if ( $this->assignRecord( $sSelect ) ) {
00769 return true;
00770 }
00771
00772
00773 return false;
00774 }
00775
00781 protected function _insert()
00782 {
00783
00784
00785 if ( $this->oxcategories__oxparentid->value != "oxrootid") {
00786
00787
00788 $oParent = oxNew( "oxcategory" );
00789
00790 if ( !$oParent->load( $this->oxcategories__oxparentid->value) ) {
00791 return false;
00792 }
00793
00794 $sAdd = " and oxshopid = '" . $this->getShopId() . "' ";
00795
00796
00797 $oDB = oxDb::getDb();
00798 $oDB->execute( "UPDATE oxcategories SET OXLEFT = OXLEFT + 2
00799 WHERE OXROOTID = '".$oParent->oxcategories__oxrootid->value."'
00800 AND OXLEFT > ".$oParent->oxcategories__oxright->value."
00801 AND OXRIGHT >= ".$oParent->oxcategories__oxright->value.$sAdd);
00802
00803
00804 $oDB->execute( "UPDATE oxcategories SET OXRIGHT = OXRIGHT + 2
00805 WHERE OXROOTID = '".$oParent->oxcategories__oxrootid->value."'
00806 AND OXRIGHT >= ".$oParent->oxcategories__oxright->value.$sAdd );
00807
00808
00809
00810
00811
00812 if ( !$this->getId() ) {
00813 $this->setId();
00814 }
00815
00816 $this->oxcategories__oxrootid = new oxField($oParent->oxcategories__oxrootid->value, oxField::T_RAW);
00817 $this->oxcategories__oxleft = new oxField($oParent->oxcategories__oxright->value, oxField::T_RAW);
00818 $this->oxcategories__oxright = new oxField($oParent->oxcategories__oxright->value + 1, oxField::T_RAW);
00819 return parent::_insert();
00820 } else {
00821
00822 if ( !$this->getId() ) {
00823 $this->setId();
00824 }
00825
00826 $this->oxcategories__oxrootid = new oxField($this->getId(), oxField::T_RAW);
00827 $this->oxcategories__oxleft = new oxField(1, oxField::T_RAW);
00828 $this->oxcategories__oxright = new oxField(2, oxField::T_RAW);
00829 return parent::_insert();
00830 }
00831 }
00832
00838 protected function _update()
00839 {
00840
00841 $oDB = oxDb::getDb();
00842
00843 $sOldParentID = $oDB->getOne( "select oxparentid from oxcategories where oxid = '".$this->getId()."'");
00844
00845 if ( $this->_blIsSeoObject && $this->isAdmin() ) {
00846 oxSeoEncoderCategory::getInstance()->markRelatedAsExpired($this);
00847 }
00848
00849 $blRes = parent::_update();
00850
00851
00852
00853
00854
00855
00856
00857
00858
00859
00860 if ( $this->oxcategories__oxparentid->value != $sOldParentID) {
00861 $sOldParentLeft = $this->oxcategories__oxleft->value;
00862 $sOldParentRight = $this->oxcategories__oxright->value;
00863
00864 $iTreeSize = $sOldParentRight-$sOldParentLeft+1;
00865
00866 $sNewRootID = $oDB->getOne( "select oxrootid from oxcategories where oxid = '".$this->oxcategories__oxparentid->value."'");
00867
00868
00869 if ( $sNewRootID == "") {
00870
00871 $sNewRootID = $this->getId();
00872 }
00873
00874 $sNewParentLeft = $oDB->getOne( "select oxleft from oxcategories where oxid = '".$this->oxcategories__oxparentid->value."'");
00875
00876
00877
00878
00879
00880
00881 $iMoveAfter = $sNewParentLeft+1;
00882
00883
00884
00885 if ($sNewParentLeft > $sOldParentLeft && $sNewParentLeft < $sOldParentRight && $this->oxcategories__oxrootid->value == $sNewRootID) {
00886
00887
00888
00889 $sRestoreOld = "UPDATE oxcategories SET OXPARENTID = '".$sOldParentID."' WHERE oxid = '".$this->getId()."'";
00890 $oDB->execute( $sRestoreOld );
00891 return false;
00892 }
00893
00894
00895 if ($sOldParentLeft > $iMoveAfter && $this->oxcategories__oxrootid->value == $sNewRootID) {
00896 $sOldParentLeft += $iTreeSize;
00897 $sOldParentRight += $iTreeSize;
00898 }
00899
00900 $iDelta = $iMoveAfter-$sOldParentLeft;
00901
00902
00903
00904 $sAddOld = " and oxshopid = '" . $this->getShopId() . "' and OXROOTID = '".$this->oxcategories__oxrootid->value."';";
00905 $sAddNew = " and oxshopid = '" . $this->getShopId() . "' and OXROOTID = '".$sNewRootID."';";
00906
00907
00908 $oDB->execute( "UPDATE oxcategories SET OXLEFT = (OXLEFT + ".$iTreeSize.") WHERE OXLEFT >= ".$iMoveAfter.$sAddNew );
00909 $oDB->execute( "UPDATE oxcategories SET OXRIGHT = (OXRIGHT + ".$iTreeSize.") WHERE OXRIGHT >= ".$iMoveAfter.$sAddNew );
00910
00911
00912 $sChangeRootID = "";
00913 if ($this->oxcategories__oxrootid->value != $sNewRootID) {
00914
00915 $sChangeRootID = ", OXROOTID='$sNewRootID'";
00916 }
00917
00918
00919 $oDB->execute( "UPDATE oxcategories SET OXLEFT = (OXLEFT + ".$iDelta."), OXRIGHT = (OXRIGHT + ".$iDelta.") ".$sChangeRootID." WHERE OXLEFT >= ".$sOldParentLeft." AND OXRIGHT <= ".$sOldParentRight.$sAddOld );
00920
00921
00922
00923 $oDB->execute( "UPDATE oxcategories SET OXLEFT = (OXLEFT - ".$iTreeSize.") WHERE OXLEFT >= ".($sOldParentRight+1).$sAddOld );
00924 $oDB->execute( "UPDATE oxcategories SET OXRIGHT = (OXRIGHT - ".$iTreeSize.") WHERE OXRIGHT >= ".($sOldParentRight+1).$sAddOld );
00925
00926 }
00927
00928 if ( $blRes && $this->_blIsSeoObject && $this->isAdmin() ) {
00929 oxSeoEncoderCategory::getInstance()->markRelatedAsExpired($this);
00930 }
00931
00932 return $blRes;
00933 }
00934
00944 protected function _setFieldData( $sFieldName, $sValue, $iDataType = oxField::T_TEXT)
00945 {
00946
00947 if ($sFieldName[2] == 'l' || $sFieldName[2] == 'L' || (isset($sFieldName[16]) && ($sFieldName[16] == 'l' || $sFieldName[16] == 'L') ) ) {
00948 if ('oxlongdesc' === strtolower($sFieldName) || 'oxcategories__oxlongdesc' === strtolower($sFieldName)) {
00949 $iDataType = oxField::T_RAW;
00950 }
00951 }
00952 return parent::_setFieldData($sFieldName, $sValue, $iDataType);
00953 }
00954
00955
00961 public function getIconUrl()
00962 {
00963 return $this->getConfig()->getPictureUrl( 'icon/'.$this->oxcategories__oxicon->value );
00964 }
00965
00971 public function isTopCategory()
00972 {
00973 if ( $this->_blTopCategory == null ) {
00974 $this->_blTopCategory = $this->oxcategories__oxparentid->value == 'oxrootid';
00975 }
00976 return $this->_blTopCategory;
00977 }
00978 }