oxcmp_shop.php
Go to the documentation of this file.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 $oParentView = $this->getParent();
00029 $oParentView->setShopLogo( $sShopLogo );
00030
00031 $oParentView->addTplParam( 'shoplogo', $oParentView->getShopLogo() );
00032 }
00033
00034
00035 $oShop = $myConfig->getActiveShop();
00036 if ( !$oShop->oxshops__oxactive->value && 'oxstart' != $myConfig->getActiveView()->getClassName() && !$this->isAdmin() ) {
00037 $oEx = oxNew( 'oxShopException' );
00038 $oEx->setMessage( 'EXCEPTION_SHOP_NOTACTIVE' );
00039 throw $oEx;
00040 }
00041
00042 return $oShop;
00043 }
00044 }