Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

404 with Custom Search Form & Results
 
Diamond-Dude
Jr. Member
 
Total Posts:  2
Joined:  2008-07-02
 

Hello all,

Im trying to create a custom search form and results page for a specific product but am getting a 404 when I try to access to following location:
http://www.domain.com/catalogsearch/newsearchtype/

(http://www.domain.com/catalogsearch/advanced/ works fine)

Can someone help me?

Since I want to use the Advanced search functionality and hardcoding specific fields in an html file, I figured the only things I needed to change were the following files and new folders.

create the following folders and files (copied from advanced search forlders)

app/code/core/Mage/CatalogSearch/Block/NewSearchType
app/code/core/Mage/CatalogSearch/Block/NewSearchType/Form.php
app/code/core/Mage/CatalogSearch/Block/NewSearchType/Result.php

app/design/frontend/default/default/template/catalogsearch/newsearchtype
app/design/frontend/default/default/template/catalogsearch/newsearchtype/form.phtml
app/design/frontend/default/default/template/catalogsearch/newsearchtype/result.phtml

Modify
app/design/frontend/default/default/layout/catalogsearch.xml

With:

<reference name="footer_links">
    <
action method="addLink" translate="label title" module="catalogsearch" ifconfig="catalog/seo/search_terms"><label>Search Terms</label><url helper="catalogsearch/getSearchTermUrl" /><title>Search Terms</title></action>
    <
action method="addLink" translate="label title" module="catalogsearch"><label>Advanced Search</label><url helper="catalogsearch/getAdvancedSearchUrl" /><title>Advanced Search</title></action>
    <
action method="addLink" translate="label title" module="catalogsearch"><label>NewSearchType Search</label><url helper="catalogsearch/getNewSearchTypeSearchUrl" /><title>NewSearchType Search</title></action>
</
reference>

<
catalogsearch_newsearhctype_index>
    <!-- 
Mage_Catalogsearch -->
    <
reference name="root">
        <
action method="setTemplate"><template>page/2columns-right.phtml</template></action>
    </
reference>
    <
reference name="content">
        <
block type="catalogsearch/newsearchtype_form" name="catalogsearch_newsearchtype_form" template="catalogsearch/newsearchtype/form.phtml"/>
    </
reference>
</
catalogsearch_newsearchtype_index>

<
catalogsearch_newsearchtype_result>
    <!-- 
Mage_Catalogsearch -->
    <
reference name="root">
        <
action method="setTemplate"><template>page/2columns-right.phtml</template></action>
    </
reference>
    <
reference name="content">
        <
block type="catalogsearch/newsearchtype_result" name="catalogsearch_newsearchtype_result" template="catalogsearch/newsearchtype/result.phtml">
            <
action method="initList"><template>catalog/product/list.phtml</template></action>
        </
block>
    </
reference>
</
catalogsearch_newsearchtype_result>

Modify
app/code/core/Mage/CatalogSearch/Helper/Data.php

with:

public function getNewSearchTypeSearchUrl()
{
    
return $this->_getUrl('catalogsearch/newsearchtype');
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
schmelzgeist
Sr. Member
 
Total Posts:  92
Joined:  2008-05-27
Marzipane World Capital (Lübeck, Germany)
 

is that a typo? 

<catalogsearch_newsearhctype_index>
, maybe that is responsible smile
 
Magento Community Magento Community
Magento Community
Magento Community
 
Diamond-Dude
Jr. Member
 
Total Posts:  2
Joined:  2008-07-02
 

It’s simply a typo in the translation for this message board (newsearchtype is simply for example)

Any other ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
ANoel
Jr. Member
 
Total Posts:  19
Joined:  2008-08-27
 

Hi,

Any news for this problem ? I have the same.

Diamond-Dude, did you find something ?

Thank you !

 
Magento Community Magento Community
Magento Community
Magento Community
 
indian dude
Jr. Member
 
Avatar
Total Posts:  13
Joined:  2008-06-15
india
 

if anyone know any answer of this forum.
pls help us here.

 
Magento Community Magento Community
Magento Community
Magento Community
 
alexhost
Member
 
Avatar
Total Posts:  69
Joined:  2009-04-10
Kiev, Ukraine
 

yes..

if trabl need try rewrite files in folders template

default/
default_theme/

and switch off CASH.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mountainappleco
Jr. Member
 
Total Posts:  4
Joined:  2009-03-24
 

If anyone has figured out a way to create a custom search results page (i.e. a copy of result.phtml) I would be very interested in knowing as I am also experiencing 404 errors.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top