【问题标题】:opencart 3 - redirect home page to categoryopencart 3 - 将主页重定向到类别
【发布时间】:2020-12-02 15:18:00
【问题描述】:

[编辑:纠正错字] 我想要 Opencart 3 主页上的类别 (index.php?route=product/category&path=1)

我测试了几种方法都没有成功:

https://forum.opencart.com/viewtopic.php?t=18952(10岁) 没有工作编辑文件 /catalog/controller/common/home.php 并添加重定向: $this->redirect(HTTP_SERVER . 'index.php?route=product/category&path=1');

Opencart 2.3.0.2 how to change default index.php?route=common/home to index.php?route=magikblog/article(4岁) 没有帮助改变 $_['action_default'] = 'common/home';$_['action_default'] = 'product/category&path=1';$_['action_default'] = 'category_id=1';(这在 SEO 页面中的最后一项工作没有问题)

请问我哪里做错了?

【问题讨论】:

    标签: redirect opencart categories


    【解决方案1】:

    把这个放在catalog\controller\common\home.php的顶部index()方法上

    $this->response->redirect($this->url->link('product/category', 'path=1'));
    return
    

    【讨论】:

    • 抱歉耽搁了,是的,它就像魅力一样,非常感谢。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-06
    • 1970-01-01
    • 2021-04-04
    • 2012-07-08
    • 2021-05-17
    相关资源
    最近更新 更多