gpt4 book ai didi

forms - 目录搜索 Magento - 不工作 https/ssl

转载 作者:太空宇宙 更新时间:2023-11-03 13:25:49 25 4
gpt4 key购买 nike

将我的 Magento 站点更新为 https://后,目录搜索功能不再有效。

我想这是因为在提交搜索查询时,表单会在 http 中发送请求。

如何确保搜索表单使用 HTTPS 发布其信息?

最佳答案

随着我更详细地调试这个问题。我发现在 catalogsearch/form.mini.phtml 模板表单中从 catalogsearch helper 获取了 URL。

$this->helper('catalogsearch')->getResultUrl();

函数定义如下:

public function getResultUrl($query = null)
{
return $this->_getUrl('catalogsearch/result', array(
'_query' => array(self::QUERY_VAR_NAME => $query),
'_secure' => Mage::app()->getFrontController()->getRequest()->isSecure()
));
}

因此它可以在安全和不安全的页面上工作。

您必须检查如何在当前主题 catalogsearch/form.mini.phtml 模板文件中获取表单提交 URL。

关于forms - 目录搜索 Magento - 不工作 https/ssl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31537864/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com