テンプレートファイルと非常に長い日があります。誰かが私が欠けているものを見ることができますか?以下は検索結果を返すことになっていますが、常に表示する製品がない状態で返されます。getNoteMessages())という行に問題があると思われるnetbeansを使用しています:?>変数の誤った割り当てであると言っていますが、それを書いた人が理由でそれを行ったと確信しています。==に変更しても、とにかく影響はないようです。考え?疲れた...
<div class="page-head">
<h3><?php echo ($this->getHeaderText() || $this->getHeaderText() === false) ? $this->getHeaderText() : $this->__("Search results for '%s'", $this->helper('catalogSearch')->getEscapedQueryText()) ?></h3>
</div>
<?php if($this->getResultCount()): ?>
<?php echo $this->getMessagesBlock()->getGroupedHtml(); ?>
<div class="page-head">
<?php if ($this->helper('rss/catalog')->getTagFeedUrl()): ?>
<a href="<?php echo $this->helper('rss/catalog')->getTagFeedUrl() ?>" class="nobr link-feed"><?php echo $this->__('Subscribe to Feed') ?></a>
<?php endif; ?>
<h4><?php echo $this->__("Products"); ?></h4>
</div>
<?php if ($messages = $this->getNoteMessages()):?>
<div class="note-msg">
<?php foreach ($messages as $message):?>
<?php echo $message?><br />
<?php endforeach;?>
</div>
<?php endif; ?>
<?php echo $this->getProductListHtml() ?>
<?php else: ?>
<div class="page-head">
<h4><?php echo $this->__("Products"); ?></h4>
</div>
<div class="note-msg">
<?php echo ($this->getNoResultText()) ? $this->getNoResultText() : $this->__('There are no results.') ?>
<?php if ($messages = $this->getNoteMessages()):?>
<?php foreach ($messages as $message):?>
<br /><?php echo $message?>
<?php endforeach;?>
<?php endif; ?>
</div>
<?php endif; ?>
<div class="clear"><p></p></div>
<?php if (Mage::helper('searchautocomplete')->isSearchCms()): ?>
<div class="page-head">
<h4><?php echo $this->__("CMS Pages"); ?></h4>
</div>
<?php if($this->getPageResultCount()): ?>
<?php $pageCollection = $this->_getPageCollection(); ?>
<ul>
<?php foreach ($pageCollection as $page) : ?>
<li><a href="<?php echo rtrim(Mage::getUrl($page->getIdentifier() == Mage::getStoreConfig('web/default/cms_home_page') ? '/' : $page->getIdentifier()),'/') ?>"><?php echo $page->getTitle(); ?></a><p><?php echo $this->_sanitizeContent($page); ?></p></li>
<?php endforeach; ?>
</ul>
<?php else: ?>
<div class="note-msg">
<?php echo $this->__('There are no results.') ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if (Mage::helper('searchautocomplete')->isSearchBlog()): ?>
<div class="page-head">
<h4><?php echo $this->__("Blog Posts"); ?></h4>
</div>
<?php $blogCollection = $this->_getBlogCollection(); ?>
<?php if(count($blogCollection)): ?>
<ul>
<?php foreach ($blogCollection as $post) : ?>
<li><a href="<?php echo rtrim(Mage::getUrl('blog/'.$post->getIdentifier()),'/') ?>"><?php echo $post->getTitle(); ?></a><p><?php echo $this->_sanitizeContent($post); ?></p></li>
<?php endforeach; ?>
</ul>
<?php else: ?>
<div class="note-msg">
<?php echo $this->__('There are no results.') ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if (Mage::helper('searchautocomplete')->isSearchCmspro()): ?>
<div class="page-head">
<h4><?php echo $this->__("News Pages"); ?></h4>
</div>
<?php $news = $this->_getNewsCollection(); ?>
<?php if(count($news)): ?>
<ul>
<?php foreach ($news as $n) : ?>
<?php $url = Mage::getModel('core/url_rewrite')->load($n->getUrlRewriteId());?>
<li><a href="<?php echo Mage::getBaseUrl().$url->getRequestPath();?>"><?php echo $n->getTitle(); ?></a><p><?php echo $this->_sanitizeContent($n); ?></p></li>
<?php endforeach; ?>
</ul>
<?php else: ?>
<div class="note-msg">
<?php echo $this->__('There are no results.') ?>
</div>
<?php endif; ?>
<?php endif; ?>