0

我在我的 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() ?>
4

1 回答 1

0

您需要像这样更改表单操作 URL (catalogsearch\advanced\form.phtml):

<form action="<?php echo Mage::getUrl('catalogsearch/advanced/result'); ?>" method="get" id="form-validate">
于 2015-09-14T08:13:42.770 回答