我已经在我的CMS主页中添加了以下代码
{{block type="catalogsearch/advanced_form" name="catalogsearch_advanced_form" template="catalogsearch/advanced/form.phtml"}}
可以很好地显示主页上的表单,但每当我搜索任何东西时,它都会给我以下错误:
哎呀,我们的坏…您所请求的页面没有找到,我们有一个很好的猜测原因。
If you typed the URL directly, please make sure the spelling is correct.
If you clicked on a link to get here, the link is outdated.
我也尝试过这个页面模板,但同样的错误出现
<?php echo $this->getLayout()->createBlock('catalogsearch/advanced_form')->setTemplate('catalogsearch/advanced/form.phtml')->toHtml() ?>
您需要像这样更改表单操作URL (catalogsearchadvancedform. php):
<form action="<?php echo Mage::getUrl('catalogsearch/advanced/result'); ?>" method="get" id="form-validate">