00001 <?php
00002
00008 class oxcmp_shop extends oxView
00009 {
00014 protected $_blIsComponent = true;
00015
00021 public function render()
00022 {
00023 parent::render();
00024
00025 $myConfig = $this->getConfig();
00026 $sShopLogo = $myConfig->getConfigParam( 'sShopLogo' );
00027 if ( $sShopLogo && file_exists( $myConfig->getAbsImageDir().'/'.$sShopLogo ) ) {
00028 $this->_oParent->setShopLogo($sShopLogo);
00029
00030 $this->_oParent->addTplParam( 'shoplogo', $this->_oParent->getShopLogo() );
00031 }
00032
00033
00034 $oShop = $myConfig->getActiveShop();
00035 if ( !$oShop->oxshops__oxactive->value && 'oxstart' != $myConfig->getActiveView()->getClassName() && !$this->isAdmin() ) {
00036 $oEx = oxNew( 'oxShopException' );
00037 $oEx->setMessage( 'EXCEPTION_SHOP_NOTACTIVE' );
00038 throw $oEx;
00039 }
00040
00041 return $oShop;
00042 }
00043 }