OXID eShop CE  4.9.6
 All Classes Files Functions Variables Pages
oxcmp_shop.php
Go to the documentation of this file.
1 <?php
2 
9 class oxcmp_shop extends oxView
10 {
11 
17  protected $_blIsComponent = true;
18 
24  public function render()
25  {
27 
28  $myConfig = $this->getConfig();
29 
30  // is shop active?
31  $oShop = $myConfig->getActiveShop();
32  $sActiveField = 'oxshops__oxactive';
33  $sClassName = $myConfig->getActiveView()->getClassName();
34 
35  if (!$oShop->$sActiveField->value && 'oxstart' != $sClassName && !$this->isAdmin()) {
36  // redirect to offline if there is no active shop
37  oxRegistry::getUtils()->redirectOffline();
38  }
39 
40  return $oShop;
41  }
42 }