Shopware插件

问题描述 投票:0回答:2

我正在尝试在商店中创建一个基本插件我还添加了来自商品的参考站点的代码。该插件也可在商店后端获得。但是当我尝试在我的浏览器上发布网址http://localhost/shopware/RoutingDemonstration时,它只会重定向到主页。即使我在网址重定向到主页而不是404页面后添加任何内容,也没有显示任何错误。

plugins shopware
2个回答
0
投票

404的默认行为是重定向到主页。因此,您的控制器似乎未正确注册。您需要向我们展示一些源代码以了解您的问题。也许您的订阅者不起作用?

有关如何在文档中执行此操作的完整示例:https://developers.shopware.com/developers-guide/legacy-plugin-system/#register-plugin-controller-with-template-in-a-subscriber


0
投票

如果要查看PHP错误,还必须将以下PHP代码添加到config.php文件中:

'front' => [
    'throwExceptions' => true,
    'showException' => true
],

'phpsettings' => [
    'display_errors' => 1
],

'template' => [
    'forceCompile' => true
],

'csrfProtection' => [
    'frontend' => true,
    'backend' => true
],

'httpcache' => [
    'debug' => true
]
© www.soinside.com 2019 - 2024. All rights reserved.