我有一个问题,以前以某种方式在这里发布过,但从来没有针对这种情况。通常此错误发生在 App.php 中,但对我来说,它发生在第 42 行的 /httpdocs/app/design/frontend/default/theme/template/catalog/category/view.phtml 中,我已在下面指出。
有没有人对此有任何想法?我有点不知所措。
<?php
/**
* Category view template
*
* @see Mage_Catalog_Block_Category_View
*/
?>
<?php
$_helper = $this->helper('catalog/output');
$_category = $this->getCurrentCategory();
$_imgHtml = '';
$_category->setCanShowBlock(false);
$_category->setHasHeaderImage(false);
//////Line 42/////// if (get_class($this->getLayout()->getBlock('catalog.leftnav')) != 'Mage_Catalog_Block_Navigation') {
$_category->setCanShowBlock($this->getLayout()->getBlock('mana.catalog.leftnav')->canShowBlock());
}
if ($_imgUrl = $_category->getImageUrl()) {
$_imgHtml = '<img src="'.$_imgUrl.'" alt="'.$this->htmlEscape($_category->getName()).'" title="'.$this->htmlEscape($_category->getName()).'" />';
$_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image');
$_category->setHasHeaderImage(true);
}
?>
<?php /*
<!-- <div class="page-title category-title">
<?php if($this->IsRssCatalogEnable() && $this->IsTopCategory()): ?>
<a href="<?php echo $this->getRssLink() ?>" class="link-rss"><?php echo $this->__('Subscribe to RSS Feed') ?></a>
<?php endif; ?>
<h1><img src="<?php echo $this->getSkinUrl('images/' . $_helper->categoryAttribute($_category, $_category->getName(), 'name') . '.jpg') ?>" alt="<?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?>" /></h1>
</div> -->
*/
Mage::getModel('core/session')->setHasAdditionalDescription(false);
?>
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
<div id="category_top_image"<?php if ($_category->getCanShowBlock()): ?> style="margin-left: -280px;"<?php endif ?>>
<?php if($_imgUrl): ?>
<?php echo $_imgHtml ?>
<?php endif; ?>
<?php if(strtolower($_category->getHideTitle()) != 'yes'): ?>
<h1><?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?></h1>
<?php endif ?>
<?php if($_description=$this->getCurrentCategory()->getDescription()): ?>
<div class="category-description std">
<?php echo $_helper->categoryAttribute($_category, $_description, 'description') ?>
</div>
<?php endif; ?>
</div>
<?php if($this->isContentMode()): ?>
<?php echo $this->getCmsBlockHtml() ?>
<?php elseif($this->isMixedMode()): ?>
<?php echo $this->getCmsBlockHtml() ?>
<?php if($_description=$this->getCurrentCategory()->getAdditionalDescription()): ?>
<?php Mage::getModel('core/session')->setHasAdditionalDescription(true) ?>
<div class="category-additional-description std">
<?php echo $_helper->categoryAttribute($_category, $_description, 'additional_description') ?>
</div>
<?php endif; ?>
<?php echo $this->getProductListHtml() ?>
<?php else: ?>
<?php if($_description=$this->getCurrentCategory()->getAdditionalDescription()): ?>
<?php Mage::getModel('core/session')->setHasAdditionalDescription(true) ?>
<div class="category-additional-description std">
<?php echo $_helper->categoryAttribute($_category, $_description, 'additional_description') ?>
</div>
<?php endif; ?>
<?php echo $this->getProductListHtml() ?>
<?php endif; ?>