【问题标题】:Shopware6: Plugin configuration is missingShopware6:缺少插件配置
【发布时间】:2020-11-20 10:33:54
【问题描述】:

我正在编写我的第一个 Shopware 6 插件并关注 this howto

但插件的导航条目不会显示。 (网址:admin#/sw/settings/index),菜单如下所示: 但它应该是这样的:

我的插件处于活动状态(在后端检查),表已创建,所以我猜它已加载。

我将教程中的 config.xml 文件复制到我的插件中并验证了它(只是为了确定)。

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/platform/master/src/Core/System/SystemConfig/Schema/config.xsd">
<card>
    <title>Basic Configuration</title>
    <title lang="de-DE">Grundeinstellungen</title>

    <input-field>
        <name>email</name>
        <copyable>true</copyable>
        <label>eMail address</label>
        <label lang="de-DE">E-Mailadresse</label>
        <placeholder>you@example.com</placeholder>
        <placeholder lang="de-DE">du@beispiel.de</placeholder>
        <helpText>Please fill in your personal eMail address</helpText>
        <helpText lang="de-DE">Bitte trage deine persönliche E-Mailadresse ein</helpText>
    </input-field>

    <input-field type="single-select">
        <name>mailMethod</name>
        <options>
            <option>
                <id>smtp</id>
                <name>English smtp</name>
                <name lang="de-DE">German smtp</name>
            </option>
            <option>
                <id>pop3</id>
                <name>English pop3</name>
                <name lang="de-DE">German pop3</name>
            </option>
        </options>
        <defaultValue>smtp</defaultValue>
        <label>Mail method</label>
        <label lang="de-DE">Versand-Protokoll</label>
    </input-field>
</card>

<card>
    <title>Advanced Configuration</title>
    <title lang="de-DE">Erweiterte Einstellungen</title>

    <input-field type="password">
        <name>secret</name>
        <label>Secret token</label>
        <label lang="de-DE">Geheimschlüssel</label>
        <helpText>Your secret token for xyz...</helpText>
        <helpText lang="de-DE">Dein geheimer Schlüssel für xyz...</helpText>
    </input-field>
</card>

那么显示插件导航入口的前提是什么?

【问题讨论】:

    标签: shopware shopware6


    【解决方案1】:

    好吧,问题是,我看错地方了。

    对于设置选项卡,您需要一个带有 settingItem 的自己的模块

    -- 希姆

    如果有人像我一样使用 config.xml,你可以在隐藏在三个点后面的插件配置中进行配置。

    【讨论】:

      猜你喜欢
      • 2021-07-06
      • 2014-11-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-30
      • 2013-05-25
      • 1970-01-01
      相关资源
      最近更新 更多