Note that there are some explanatory texts on larger screens.

plurals
  1. POMagento - Error with store search, always returning no results.
    primarykey
    data
    text
    <p>I have a template file and a very long day. Can anyone see what i am missing. The following is supposed to return search results however always returns with no products to display. I am using netbeans which seems to have an issue with the line getNoteMessages()): ?> saying that it was an accidental assignment of a variable but i'm sure the person who wrote it did it for a reason. Change it to a == doesn't seem to have any affect anyway. Thoughts? Tired... </p> <pre><code>&lt;div class="page-head"&gt; &lt;h3&gt;&lt;?php echo ($this-&gt;getHeaderText() || $this-&gt;getHeaderText() === false) ? $this-&gt;getHeaderText() : $this-&gt;__("Search results for '%s'", $this-&gt;helper('catalogSearch')-&gt;getEscapedQueryText()) ?&gt;&lt;/h3&gt; &lt;/div&gt; &lt;?php if($this-&gt;getResultCount()): ?&gt; &lt;?php echo $this-&gt;getMessagesBlock()-&gt;getGroupedHtml(); ?&gt; &lt;div class="page-head"&gt; &lt;?php if ($this-&gt;helper('rss/catalog')-&gt;getTagFeedUrl()): ?&gt; &lt;a href="&lt;?php echo $this-&gt;helper('rss/catalog')-&gt;getTagFeedUrl() ?&gt;" class="nobr link-feed"&gt;&lt;?php echo $this-&gt;__('Subscribe to Feed') ?&gt;&lt;/a&gt; &lt;?php endif; ?&gt; &lt;h4&gt;&lt;?php echo $this-&gt;__("Products"); ?&gt;&lt;/h4&gt; &lt;/div&gt; &lt;?php if ($messages = $this-&gt;getNoteMessages()):?&gt; &lt;div class="note-msg"&gt; &lt;?php foreach ($messages as $message):?&gt; &lt;?php echo $message?&gt;&lt;br /&gt; &lt;?php endforeach;?&gt; &lt;/div&gt; &lt;?php endif; ?&gt; &lt;?php echo $this-&gt;getProductListHtml() ?&gt; &lt;?php else: ?&gt; &lt;div class="page-head"&gt; &lt;h4&gt;&lt;?php echo $this-&gt;__("Products"); ?&gt;&lt;/h4&gt; &lt;/div&gt; &lt;div class="note-msg"&gt; &lt;?php echo ($this-&gt;getNoResultText()) ? $this-&gt;getNoResultText() : $this-&gt;__('There are no results.') ?&gt; &lt;?php if ($messages = $this-&gt;getNoteMessages()):?&gt; &lt;?php foreach ($messages as $message):?&gt; &lt;br /&gt;&lt;?php echo $message?&gt; &lt;?php endforeach;?&gt; &lt;?php endif; ?&gt; &lt;/div&gt; &lt;?php endif; ?&gt; &lt;div class="clear"&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt; &lt;?php if (Mage::helper('searchautocomplete')-&gt;isSearchCms()): ?&gt; &lt;div class="page-head"&gt; &lt;h4&gt;&lt;?php echo $this-&gt;__("CMS Pages"); ?&gt;&lt;/h4&gt; &lt;/div&gt; &lt;?php if($this-&gt;getPageResultCount()): ?&gt; &lt;?php $pageCollection = $this-&gt;_getPageCollection(); ?&gt; &lt;ul&gt; &lt;?php foreach ($pageCollection as $page) : ?&gt; &lt;li&gt;&lt;a href="&lt;?php echo rtrim(Mage::getUrl($page-&gt;getIdentifier() == Mage::getStoreConfig('web/default/cms_home_page') ? '/' : $page-&gt;getIdentifier()),'/') ?&gt;"&gt;&lt;?php echo $page-&gt;getTitle(); ?&gt;&lt;/a&gt;&lt;p&gt;&lt;?php echo $this-&gt;_sanitizeContent($page); ?&gt;&lt;/p&gt;&lt;/li&gt; &lt;?php endforeach; ?&gt; &lt;/ul&gt; &lt;?php else: ?&gt; &lt;div class="note-msg"&gt; &lt;?php echo $this-&gt;__('There are no results.') ?&gt; &lt;/div&gt; &lt;?php endif; ?&gt; &lt;?php endif; ?&gt; &lt;?php if (Mage::helper('searchautocomplete')-&gt;isSearchBlog()): ?&gt; &lt;div class="page-head"&gt; &lt;h4&gt;&lt;?php echo $this-&gt;__("Blog Posts"); ?&gt;&lt;/h4&gt; &lt;/div&gt; &lt;?php $blogCollection = $this-&gt;_getBlogCollection(); ?&gt; &lt;?php if(count($blogCollection)): ?&gt; &lt;ul&gt; &lt;?php foreach ($blogCollection as $post) : ?&gt; &lt;li&gt;&lt;a href="&lt;?php echo rtrim(Mage::getUrl('blog/'.$post-&gt;getIdentifier()),'/') ?&gt;"&gt;&lt;?php echo $post-&gt;getTitle(); ?&gt;&lt;/a&gt;&lt;p&gt;&lt;?php echo $this-&gt;_sanitizeContent($post); ?&gt;&lt;/p&gt;&lt;/li&gt; &lt;?php endforeach; ?&gt; &lt;/ul&gt; &lt;?php else: ?&gt; &lt;div class="note-msg"&gt; &lt;?php echo $this-&gt;__('There are no results.') ?&gt; &lt;/div&gt; &lt;?php endif; ?&gt; &lt;?php endif; ?&gt; &lt;?php if (Mage::helper('searchautocomplete')-&gt;isSearchCmspro()): ?&gt; &lt;div class="page-head"&gt; &lt;h4&gt;&lt;?php echo $this-&gt;__("News Pages"); ?&gt;&lt;/h4&gt; &lt;/div&gt; &lt;?php $news = $this-&gt;_getNewsCollection(); ?&gt; &lt;?php if(count($news)): ?&gt; &lt;ul&gt; &lt;?php foreach ($news as $n) : ?&gt; &lt;?php $url = Mage::getModel('core/url_rewrite')-&gt;load($n-&gt;getUrlRewriteId());?&gt; &lt;li&gt;&lt;a href="&lt;?php echo Mage::getBaseUrl().$url-&gt;getRequestPath();?&gt;"&gt;&lt;?php echo $n-&gt;getTitle(); ?&gt;&lt;/a&gt;&lt;p&gt;&lt;?php echo $this-&gt;_sanitizeContent($n); ?&gt;&lt;/p&gt;&lt;/li&gt; &lt;?php endforeach; ?&gt; &lt;/ul&gt; &lt;?php else: ?&gt; &lt;div class="note-msg"&gt; &lt;?php echo $this-&gt;__('There are no results.') ?&gt; &lt;/div&gt; &lt;?php endif; ?&gt; &lt;?php endif; ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload