adding specific system.xml to store config Magento2












0















I am trying to add fields for configuration to stores in my application with my module that i am building.



The problem is i cant find any documentation on adding it to store's i only can find it so i can add it to global configuration and that is not the place i want to have it.



So i want to find a way to make this happen this is my normal configuration for my general config.



<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<tab id="mageplaza" translate="label" sortOrder="10">
<label>Koppelingen</label>
</tab>
<section id="exact" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
<class>separator-top</class>
<label>Exact Online</label>
<tab>mageplaza</tab>
<resource>Mageplaza_HelloWorld::hello_configuration</resource>
<group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
<label>General Configuration</label>
<field id="exact" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Id Of Exact</label>
<comment>Exact Online Id</comment>
</field>
<field id="display_text" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Secret Of Exact</label>
<comment>Exact Online Secret</comment>
</field>
<field id="base_url" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Base Url</label>
<comment>Base Url For Callback</comment>
</field>
<field id="project" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Project</label>
<comment>The place to fill in your project for the store</comment>
</field>
</group>
</section>
</system>
</config>









share|improve this question





























    0















    I am trying to add fields for configuration to stores in my application with my module that i am building.



    The problem is i cant find any documentation on adding it to store's i only can find it so i can add it to global configuration and that is not the place i want to have it.



    So i want to find a way to make this happen this is my normal configuration for my general config.



    <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
    <tab id="mageplaza" translate="label" sortOrder="10">
    <label>Koppelingen</label>
    </tab>
    <section id="exact" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
    <class>separator-top</class>
    <label>Exact Online</label>
    <tab>mageplaza</tab>
    <resource>Mageplaza_HelloWorld::hello_configuration</resource>
    <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
    <label>General Configuration</label>
    <field id="exact" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
    <label>Id Of Exact</label>
    <comment>Exact Online Id</comment>
    </field>
    <field id="display_text" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
    <label>Secret Of Exact</label>
    <comment>Exact Online Secret</comment>
    </field>
    <field id="base_url" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
    <label>Base Url</label>
    <comment>Base Url For Callback</comment>
    </field>
    <field id="project" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
    <label>Project</label>
    <comment>The place to fill in your project for the store</comment>
    </field>
    </group>
    </section>
    </system>
    </config>









    share|improve this question



























      0












      0








      0








      I am trying to add fields for configuration to stores in my application with my module that i am building.



      The problem is i cant find any documentation on adding it to store's i only can find it so i can add it to global configuration and that is not the place i want to have it.



      So i want to find a way to make this happen this is my normal configuration for my general config.



      <?xml version="1.0"?>
      <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
      <system>
      <tab id="mageplaza" translate="label" sortOrder="10">
      <label>Koppelingen</label>
      </tab>
      <section id="exact" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
      <class>separator-top</class>
      <label>Exact Online</label>
      <tab>mageplaza</tab>
      <resource>Mageplaza_HelloWorld::hello_configuration</resource>
      <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
      <label>General Configuration</label>
      <field id="exact" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
      <label>Id Of Exact</label>
      <comment>Exact Online Id</comment>
      </field>
      <field id="display_text" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
      <label>Secret Of Exact</label>
      <comment>Exact Online Secret</comment>
      </field>
      <field id="base_url" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
      <label>Base Url</label>
      <comment>Base Url For Callback</comment>
      </field>
      <field id="project" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
      <label>Project</label>
      <comment>The place to fill in your project for the store</comment>
      </field>
      </group>
      </section>
      </system>
      </config>









      share|improve this question
















      I am trying to add fields for configuration to stores in my application with my module that i am building.



      The problem is i cant find any documentation on adding it to store's i only can find it so i can add it to global configuration and that is not the place i want to have it.



      So i want to find a way to make this happen this is my normal configuration for my general config.



      <?xml version="1.0"?>
      <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
      <system>
      <tab id="mageplaza" translate="label" sortOrder="10">
      <label>Koppelingen</label>
      </tab>
      <section id="exact" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
      <class>separator-top</class>
      <label>Exact Online</label>
      <tab>mageplaza</tab>
      <resource>Mageplaza_HelloWorld::hello_configuration</resource>
      <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
      <label>General Configuration</label>
      <field id="exact" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
      <label>Id Of Exact</label>
      <comment>Exact Online Id</comment>
      </field>
      <field id="display_text" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
      <label>Secret Of Exact</label>
      <comment>Exact Online Secret</comment>
      </field>
      <field id="base_url" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
      <label>Base Url</label>
      <comment>Base Url For Callback</comment>
      </field>
      <field id="project" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
      <label>Project</label>
      <comment>The place to fill in your project for the store</comment>
      </field>
      </group>
      </section>
      </system>
      </config>






      magento2






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 9 mins ago









      Teja Bhagavan Kollepara

      2,94841847




      2,94841847










      asked Feb 3 '17 at 14:00









      user50174user50174

      1




      1






















          2 Answers
          2






          active

          oldest

          votes


















          0














          This updated system.xml file is what you have to use:



          <?xml version="1.0"?>
          <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
          <system>
          <tab id="mageplaza" translate="label" sortOrder="10">
          <label>Koppelingen</label>
          </tab>
          <section id="exact" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
          <class>separator-top</class>
          <label>Exact Online</label>
          <tab>mageplaza</tab>
          <resource>Mageplaza_HelloWorld::hello_configuration</resource>
          <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
          <label>General Configuration</label>
          <field id="exact" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
          <label>Id Of Exact</label>
          <comment>Exact Online Id</comment>
          </field>
          <field id="display_text" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
          <label>Secret Of Exact</label>
          <comment>Exact Online Secret</comment>
          </field>
          <field id="base_url" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
          <label>Base Url</label>
          <comment>Base Url For Callback</comment>
          </field>
          <field id="project" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
          <label>Project</label>
          <comment>The place to fill in your project for the store</comment>
          </field>
          </group>
          </section>
          </system>




          It will enable configuration on all levels: Global, Website and Store.






          share|improve this answer































            0














            change showInStore="0" to showInStore="1" on field and group level for it to display on store scope.



            From the XML-schema we can see that you define with integer 1/0 the visibility level of your configuration setting. In your case the section attribute showInDefault,showInWebsite and showInStore is the only one set to 1, so section will display on store scope but not the individual field configuration settings.



            https://github.com/magento/magento2/blob/develop/app/code/Magento/Config/etc/system.xsd#L61






            share|improve this answer

























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "479"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f157957%2fadding-specific-system-xml-to-store-config-magento2%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              This updated system.xml file is what you have to use:



              <?xml version="1.0"?>
              <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
              <system>
              <tab id="mageplaza" translate="label" sortOrder="10">
              <label>Koppelingen</label>
              </tab>
              <section id="exact" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
              <class>separator-top</class>
              <label>Exact Online</label>
              <tab>mageplaza</tab>
              <resource>Mageplaza_HelloWorld::hello_configuration</resource>
              <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
              <label>General Configuration</label>
              <field id="exact" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
              <label>Id Of Exact</label>
              <comment>Exact Online Id</comment>
              </field>
              <field id="display_text" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
              <label>Secret Of Exact</label>
              <comment>Exact Online Secret</comment>
              </field>
              <field id="base_url" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
              <label>Base Url</label>
              <comment>Base Url For Callback</comment>
              </field>
              <field id="project" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
              <label>Project</label>
              <comment>The place to fill in your project for the store</comment>
              </field>
              </group>
              </section>
              </system>




              It will enable configuration on all levels: Global, Website and Store.






              share|improve this answer




























                0














                This updated system.xml file is what you have to use:



                <?xml version="1.0"?>
                <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
                <system>
                <tab id="mageplaza" translate="label" sortOrder="10">
                <label>Koppelingen</label>
                </tab>
                <section id="exact" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
                <class>separator-top</class>
                <label>Exact Online</label>
                <tab>mageplaza</tab>
                <resource>Mageplaza_HelloWorld::hello_configuration</resource>
                <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>General Configuration</label>
                <field id="exact" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Id Of Exact</label>
                <comment>Exact Online Id</comment>
                </field>
                <field id="display_text" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Secret Of Exact</label>
                <comment>Exact Online Secret</comment>
                </field>
                <field id="base_url" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Base Url</label>
                <comment>Base Url For Callback</comment>
                </field>
                <field id="project" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Project</label>
                <comment>The place to fill in your project for the store</comment>
                </field>
                </group>
                </section>
                </system>




                It will enable configuration on all levels: Global, Website and Store.






                share|improve this answer


























                  0












                  0








                  0







                  This updated system.xml file is what you have to use:



                  <?xml version="1.0"?>
                  <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
                  <system>
                  <tab id="mageplaza" translate="label" sortOrder="10">
                  <label>Koppelingen</label>
                  </tab>
                  <section id="exact" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
                  <class>separator-top</class>
                  <label>Exact Online</label>
                  <tab>mageplaza</tab>
                  <resource>Mageplaza_HelloWorld::hello_configuration</resource>
                  <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                  <label>General Configuration</label>
                  <field id="exact" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                  <label>Id Of Exact</label>
                  <comment>Exact Online Id</comment>
                  </field>
                  <field id="display_text" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                  <label>Secret Of Exact</label>
                  <comment>Exact Online Secret</comment>
                  </field>
                  <field id="base_url" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                  <label>Base Url</label>
                  <comment>Base Url For Callback</comment>
                  </field>
                  <field id="project" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                  <label>Project</label>
                  <comment>The place to fill in your project for the store</comment>
                  </field>
                  </group>
                  </section>
                  </system>




                  It will enable configuration on all levels: Global, Website and Store.






                  share|improve this answer













                  This updated system.xml file is what you have to use:



                  <?xml version="1.0"?>
                  <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
                  <system>
                  <tab id="mageplaza" translate="label" sortOrder="10">
                  <label>Koppelingen</label>
                  </tab>
                  <section id="exact" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
                  <class>separator-top</class>
                  <label>Exact Online</label>
                  <tab>mageplaza</tab>
                  <resource>Mageplaza_HelloWorld::hello_configuration</resource>
                  <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                  <label>General Configuration</label>
                  <field id="exact" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                  <label>Id Of Exact</label>
                  <comment>Exact Online Id</comment>
                  </field>
                  <field id="display_text" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                  <label>Secret Of Exact</label>
                  <comment>Exact Online Secret</comment>
                  </field>
                  <field id="base_url" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                  <label>Base Url</label>
                  <comment>Base Url For Callback</comment>
                  </field>
                  <field id="project" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                  <label>Project</label>
                  <comment>The place to fill in your project for the store</comment>
                  </field>
                  </group>
                  </section>
                  </system>




                  It will enable configuration on all levels: Global, Website and Store.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 3 '17 at 22:09









                  Max PronkoMax Pronko

                  1,456817




                  1,456817

























                      0














                      change showInStore="0" to showInStore="1" on field and group level for it to display on store scope.



                      From the XML-schema we can see that you define with integer 1/0 the visibility level of your configuration setting. In your case the section attribute showInDefault,showInWebsite and showInStore is the only one set to 1, so section will display on store scope but not the individual field configuration settings.



                      https://github.com/magento/magento2/blob/develop/app/code/Magento/Config/etc/system.xsd#L61






                      share|improve this answer






























                        0














                        change showInStore="0" to showInStore="1" on field and group level for it to display on store scope.



                        From the XML-schema we can see that you define with integer 1/0 the visibility level of your configuration setting. In your case the section attribute showInDefault,showInWebsite and showInStore is the only one set to 1, so section will display on store scope but not the individual field configuration settings.



                        https://github.com/magento/magento2/blob/develop/app/code/Magento/Config/etc/system.xsd#L61






                        share|improve this answer




























                          0












                          0








                          0







                          change showInStore="0" to showInStore="1" on field and group level for it to display on store scope.



                          From the XML-schema we can see that you define with integer 1/0 the visibility level of your configuration setting. In your case the section attribute showInDefault,showInWebsite and showInStore is the only one set to 1, so section will display on store scope but not the individual field configuration settings.



                          https://github.com/magento/magento2/blob/develop/app/code/Magento/Config/etc/system.xsd#L61






                          share|improve this answer















                          change showInStore="0" to showInStore="1" on field and group level for it to display on store scope.



                          From the XML-schema we can see that you define with integer 1/0 the visibility level of your configuration setting. In your case the section attribute showInDefault,showInWebsite and showInStore is the only one set to 1, so section will display on store scope but not the individual field configuration settings.



                          https://github.com/magento/magento2/blob/develop/app/code/Magento/Config/etc/system.xsd#L61







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Feb 4 '17 at 10:04

























                          answered Feb 3 '17 at 14:18









                          belfort1belfort1

                          362110




                          362110






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Magento Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f157957%2fadding-specific-system-xml-to-store-config-magento2%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Magento 2 controller redirect on button click in phtml file

                              Polycentropodidae