00001 <?php 00002 00009 class oxcmp_shop extends oxView 00010 { 00011 00017 protected $_blIsComponent = true; 00018 00024 public function render() 00025 { 00026 parent::render(); 00027 00028 $myConfig = $this->getConfig(); 00029 00030 // is shop active? 00031 $oShop = $myConfig->getActiveShop(); 00032 $sActiveField = 'oxshops__oxactive'; 00033 $sClassName = $myConfig->getActiveView()->getClassName(); 00034 00035 if (!$oShop->$sActiveField->value && 'oxstart' != $sClassName && !$this->isAdmin()) { 00036 // redirect to offline if there is no active shop 00037 oxRegistry::getUtils()->redirectOffline(); 00038 } 00039 00040 return $oShop; 00041 } 00042 }