如下所示得到一些系统错误,我试图弄清楚为什么前端没有使用IE或safari登录,但是从日志中慢慢解决问题,关于这一点的任何想法,错误是第51,54行和67,
2015-05-12T13:46:34+00:00 ERR (3): Notice: Undefined offset: 1 in /var/www/vhosts/mfeuk.co.uk/httpdocs/app/design/frontend/mtorion/default/template/magenthemes/mainmenu/top.phtml on line 51
2015-05-12T13:46:34+00:00 ERR (3): Notice: Undefined offset: 1 in /var/www/vhosts/mfeuk.co.uk/httpdocs/app/design/frontend/mtorion/default/template/magenthemes/mainmenu/top.phtml on line 54
2015-05-12T13:46:34+00:00 ERR (3): Notice: Undefined offset: 1 in /var/www/vhosts/mfeuk.co.uk/httpdocs/app/design/frontend/mtorion/default/template/magenthemes/mainmenu/top.phtml on line 67
这是我的代码:
<?php
/**
*
* ------------------------------------------------------------------------------
* @category MT
* @package MT_Themes
* ------------------------------------------------------------------------------
* @copyright Copyright (C) 2008-2013 MagentoThemes.net. All Rights Reserved.
* @license GNU General Public License version 2 or later;
* @author MagentoThemes.net
* @email support@magentothemes.net
* ------------------------------------------------------------------------------
*
*/
?>
<!-- navigation BOF -->
<?php
$theme = $this->helper('mtorion');
$sticky_logo = $theme->getCfg('header/sticky_logo');
$megaeffect = Mage::getStoreConfig('mtorion/menu/effect');
$_menu = $this->renderCategoriesMenuHtml(FALSE, FALSE, 0, 'level-top', 'sub-wrapper' );
$routeName = Mage::app()->getRequest()->getRouteName();
$identifier = Mage::getSingleton('cms/page')->getIdentifier();
?>
<?php if($_menu): ?>
<div class="mt-navigation hidden-xs">
<?php
$logoSrc = $this->getSkinUrl($sticky_logo);
$logoArc = Mage::getStoreConfig('design/header/logo_alt');
?>
<div class="logo-sticky" style="display: none;">
<a href="<?php echo $this->getUrl('') ?>">
<img class="img-sticky img-responsive" src="<?php echo $logoSrc; ?>" alt="<?php echo $logoArc; ?>" />
</a>
</div>
<div class="mt-main-menu">
<ul id="mtnav" class="megamenu">
<?php if(Mage::getStoreConfig('mtorion/menu/home')){?>
<li class="level0 home level-top <?php if($routeName == 'cms' && $identifier == 'home') {echo " active";}?> m-dropdown parent">
<a href="<?php echo $this->getBaseUrl(); ?>" class="level-top"><span><?php echo $this->__('Home'); ?></span></a>
</li>
<?php }?>
<?php
echo $_menu;
if(Mage::getStoreConfig('mtorion/menu/enable_custom')){
$getidentifier = Mage::getStoreConfig('mtorion/menu/static_identifier');
$arrayidentifier = explode(";", $getidentifier);
foreach($arrayidentifier as $mcustom){
$static_block = explode(':', $mcustom);
$custom_menu = Mage::getModel('cms/block')->load($static_block[0]);
if($static_block[1]) $class = 'menu-item-'.$static_block[1];
if($custom_menu->getIsActive()) {
echo '
<li class="level0 level-top parent custom-block '.$class.'">
<a href="#" class="level-top">
<span>'.$custom_menu->getTitle().'</span>
</a>
<div class="sub-wrapper">'.$this->getLayout()->createBlock('cms/block')->setBlockId($static_block[0])->toHtml().'</div>
</li>';
}
}
$urlkey = Mage::getStoreConfig('mtorion/menu/url_key');
$arrayUrlKey = explode(";", $urlkey);
foreach($arrayUrlKey as $url){
$condition = explode(':', $url);
$page = Mage::getModel('cms/page')->load($condition[0], 'identifier');
if($condition[1]) $class = 'menu-item-'.$condition[1];
if($page->getIsActive()) {
?>
<li class="level0 level-top parent custom-block <?php if($routeName == 'cms' && $identifier == $page->getIdentifier()) {echo " active";}?> <?php echo $class;?>">
<a href="<?php echo Mage::helper('cms/page')->getPageUrl($condition[0]);?>" class="level-top">
<span><?php echo $page->getTitle();?></span>
</a>
</li>
<?php
}
}
}
?>
</ul>
</div>
</div>
<script type="text/javascript">
$mt(function(){
$mt(".megamenu").megamenu({
'animation':'<?php echo $megaeffect;?>',
'mm_timeout': 150
});
});
</script>
<?php endif ?>
<!-- navigation EOF -->