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->getImageDir().'/'.$sShopLogo ) ) {
00028                 $oParentView = $this->getParent();
00029                 $oParentView->setShopLogo( $sShopLogo );
00030             }
00031 
00032         // is shop active?
00033         $oShop = $myConfig->getActiveShop();
00034         if ( !$oShop->oxshops__oxactive->value && 'oxstart' != $myConfig->getActiveView()->getClassName() && !$this->isAdmin() ) {
00035             $oEx = oxNew( 'oxShopException' );
00036             $oEx->setMessage( 'EXCEPTION_SHOP_NOTACTIVE' );
00037             throw $oEx;
00038         }
00039 
00040         return $oShop;
00041     }
00042 }