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 00027 // is shop active? 00028 $oShop = $myConfig->getActiveShop(); 00029 if ( !$oShop->oxshops__oxactive->value && 'oxstart' != $myConfig->getActiveView()->getClassName() && !$this->isAdmin() ) { 00030 // redirect to offline if there is no active shop 00031 $sShopUrl = oxRegistry::getConfig()->getSslShopUrl(); 00032 oxRegistry::getUtils()->redirect( $sShopUrl . 'offline.html', false ); 00033 } 00034 00035 return $oShop; 00036 } 00037 }