Magento 2 Store View multiselect in system.xmlGet custom field in system.xmlRestrict access by Store Viewmagento set store view by store idMagento Store View LanguageHow to overwrite System.xml?How to remove section from system.xml file?Magento2 store and store viewProgrammatically set Store View localeMagento2 : Retrieve Multiselect Values in system.xmlMagento Store view URL

How much RAM could one put in a typical 80386 setup?

How is it possible to have an ability score that is less than 3?

What's the output of a record cartridge playing an out-of-speed record

How do I create uniquely male characters?

Writing rule stating superpower from different root cause is bad writing

What do you call a Matrix-like slowdown and camera movement effect?

Modeling an IPv4 Address

Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?

Why was the small council so happy for Tyrion to become the Master of Coin?

What are the differences between the usage of 'it' and 'they'?

Do I have a twin with permutated remainders?

How can bays and straits be determined in a procedurally generated map?

What typically incentivizes a professor to change jobs to a lower ranking university?

How old can references or sources in a thesis be?

Test if tikzmark exists on same page

Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)

Is it important to consider tone, melody, and musical form while writing a song?

Why can't I see bouncing of a switch on an oscilloscope?

What does "Puller Prush Person" mean?

TGV timetables / schedules?

What are these boxed doors outside store fronts in New York?

Watching something be written to a file live with tail

Show that if two triangles built on parallel lines, with equal bases have the same perimeter only if they are congruent.

Can I make popcorn with any corn?



Magento 2 Store View multiselect in system.xml


Get custom field in system.xmlRestrict access by Store Viewmagento set store view by store idMagento Store View LanguageHow to overwrite System.xml?How to remove section from system.xml file?Magento2 store and store viewProgrammatically set Store View localeMagento2 : Retrieve Multiselect Values in system.xmlMagento Store view URL






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am not able to add store view selection in system.xml I am only able to add in the ui form field component:



When I tried to add in system.xml it gives the error:



1 exception(s):
Exception #0 (Exception): Warning: htmlspecialchars() expects parameter 1 to be string,
array given in
.../vendor/magento/framework/Data/Form/Element/AbstractElement.php on line 287


system.xml:



<field id="store_view" translate="label" type="multiselect" sortOrder="13" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Store view</label>
<source_model>MagentoCmsUiComponentListingColumnCmsOptions</source_model>
</field>


form_edit.xml



<field name="store">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">MagentoCmsUiComponentListingColumnCmsOptions/item>
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Store</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">number</item>
<item name="formElement" xsi:type="string">multiselect</item>
<item name="source" xsi:type="string">store</item>
<item name="multiple" xsi:type="boolean">true</item>
<item name="dataScope" xsi:type="string">store</item>
<item name="valueMap" xsi:type="array">
<item name="true" xsi:type="number">1</item>
<item name="false" xsi:type="number">0</item>
</item>
<item name="default" xsi:type="number">0</item>
</item>
</argument>
</field>


enter image description here



Is it possible at all the way magento has build this?










share|improve this question




























    0















    I am not able to add store view selection in system.xml I am only able to add in the ui form field component:



    When I tried to add in system.xml it gives the error:



    1 exception(s):
    Exception #0 (Exception): Warning: htmlspecialchars() expects parameter 1 to be string,
    array given in
    .../vendor/magento/framework/Data/Form/Element/AbstractElement.php on line 287


    system.xml:



    <field id="store_view" translate="label" type="multiselect" sortOrder="13" showInDefault="1" showInWebsite="1" showInStore="1">
    <label>Store view</label>
    <source_model>MagentoCmsUiComponentListingColumnCmsOptions</source_model>
    </field>


    form_edit.xml



    <field name="store">
    <argument name="data" xsi:type="array">
    <item name="options" xsi:type="object">MagentoCmsUiComponentListingColumnCmsOptions/item>
    <item name="config" xsi:type="array">
    <item name="label" xsi:type="string" translate="true">Store</item>
    <item name="visible" xsi:type="boolean">true</item>
    <item name="dataType" xsi:type="string">number</item>
    <item name="formElement" xsi:type="string">multiselect</item>
    <item name="source" xsi:type="string">store</item>
    <item name="multiple" xsi:type="boolean">true</item>
    <item name="dataScope" xsi:type="string">store</item>
    <item name="valueMap" xsi:type="array">
    <item name="true" xsi:type="number">1</item>
    <item name="false" xsi:type="number">0</item>
    </item>
    <item name="default" xsi:type="number">0</item>
    </item>
    </argument>
    </field>


    enter image description here



    Is it possible at all the way magento has build this?










    share|improve this question
























      0












      0








      0








      I am not able to add store view selection in system.xml I am only able to add in the ui form field component:



      When I tried to add in system.xml it gives the error:



      1 exception(s):
      Exception #0 (Exception): Warning: htmlspecialchars() expects parameter 1 to be string,
      array given in
      .../vendor/magento/framework/Data/Form/Element/AbstractElement.php on line 287


      system.xml:



      <field id="store_view" translate="label" type="multiselect" sortOrder="13" showInDefault="1" showInWebsite="1" showInStore="1">
      <label>Store view</label>
      <source_model>MagentoCmsUiComponentListingColumnCmsOptions</source_model>
      </field>


      form_edit.xml



      <field name="store">
      <argument name="data" xsi:type="array">
      <item name="options" xsi:type="object">MagentoCmsUiComponentListingColumnCmsOptions/item>
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string" translate="true">Store</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">number</item>
      <item name="formElement" xsi:type="string">multiselect</item>
      <item name="source" xsi:type="string">store</item>
      <item name="multiple" xsi:type="boolean">true</item>
      <item name="dataScope" xsi:type="string">store</item>
      <item name="valueMap" xsi:type="array">
      <item name="true" xsi:type="number">1</item>
      <item name="false" xsi:type="number">0</item>
      </item>
      <item name="default" xsi:type="number">0</item>
      </item>
      </argument>
      </field>


      enter image description here



      Is it possible at all the way magento has build this?










      share|improve this question














      I am not able to add store view selection in system.xml I am only able to add in the ui form field component:



      When I tried to add in system.xml it gives the error:



      1 exception(s):
      Exception #0 (Exception): Warning: htmlspecialchars() expects parameter 1 to be string,
      array given in
      .../vendor/magento/framework/Data/Form/Element/AbstractElement.php on line 287


      system.xml:



      <field id="store_view" translate="label" type="multiselect" sortOrder="13" showInDefault="1" showInWebsite="1" showInStore="1">
      <label>Store view</label>
      <source_model>MagentoCmsUiComponentListingColumnCmsOptions</source_model>
      </field>


      form_edit.xml



      <field name="store">
      <argument name="data" xsi:type="array">
      <item name="options" xsi:type="object">MagentoCmsUiComponentListingColumnCmsOptions/item>
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string" translate="true">Store</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">number</item>
      <item name="formElement" xsi:type="string">multiselect</item>
      <item name="source" xsi:type="string">store</item>
      <item name="multiple" xsi:type="boolean">true</item>
      <item name="dataScope" xsi:type="string">store</item>
      <item name="valueMap" xsi:type="array">
      <item name="true" xsi:type="number">1</item>
      <item name="false" xsi:type="number">0</item>
      </item>
      <item name="default" xsi:type="number">0</item>
      </item>
      </argument>
      </field>


      enter image description here



      Is it possible at all the way magento has build this?







      magento2.2.2 store-view system.xml






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked yesterday









      Juliano VargasJuliano Vargas

      591523




      591523




















          1 Answer
          1






          active

          oldest

          votes


















          0














          system.xml :-



          <field id="store_view" translate="label" type="multiselect" sortOrder="13" showInDefault="1" showInWebsite="1" showInStore="1">
          <label>Store view</label>
          <source_model>vendormoduleModelSourceConfigOption</source_model>
          </field>
          <?php


          option.php



          namespace vendormoduleModelSourceConfig;

          class Option implements MagentoFrameworkDataOptionSourceInterface


          protected $eavConfig;


          public function __construct(
          MagentoStoreModelStoreManagerInterface $storeManager
          )

          $this->_storeManager = $storeManager;



          public function toOptionArray()

          $storeManagerDataList = $this->_storeManager->getStores();
          $options = array();

          foreach ($storeManagerDataList as $key => $value)
          $options[] = array(
          'value' => $value['name'],
          'label' => $value['code'],
          );

          return $options;







          share|improve this answer

























          • That's not the answer. in need to show parent of store view also in similar fashion to the store view switcher, same as image attached in the question.

            – Juliano Vargas
            yesterday











          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%2f268940%2fmagento-2-store-view-multiselect-in-system-xml%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          system.xml :-



          <field id="store_view" translate="label" type="multiselect" sortOrder="13" showInDefault="1" showInWebsite="1" showInStore="1">
          <label>Store view</label>
          <source_model>vendormoduleModelSourceConfigOption</source_model>
          </field>
          <?php


          option.php



          namespace vendormoduleModelSourceConfig;

          class Option implements MagentoFrameworkDataOptionSourceInterface


          protected $eavConfig;


          public function __construct(
          MagentoStoreModelStoreManagerInterface $storeManager
          )

          $this->_storeManager = $storeManager;



          public function toOptionArray()

          $storeManagerDataList = $this->_storeManager->getStores();
          $options = array();

          foreach ($storeManagerDataList as $key => $value)
          $options[] = array(
          'value' => $value['name'],
          'label' => $value['code'],
          );

          return $options;







          share|improve this answer

























          • That's not the answer. in need to show parent of store view also in similar fashion to the store view switcher, same as image attached in the question.

            – Juliano Vargas
            yesterday















          0














          system.xml :-



          <field id="store_view" translate="label" type="multiselect" sortOrder="13" showInDefault="1" showInWebsite="1" showInStore="1">
          <label>Store view</label>
          <source_model>vendormoduleModelSourceConfigOption</source_model>
          </field>
          <?php


          option.php



          namespace vendormoduleModelSourceConfig;

          class Option implements MagentoFrameworkDataOptionSourceInterface


          protected $eavConfig;


          public function __construct(
          MagentoStoreModelStoreManagerInterface $storeManager
          )

          $this->_storeManager = $storeManager;



          public function toOptionArray()

          $storeManagerDataList = $this->_storeManager->getStores();
          $options = array();

          foreach ($storeManagerDataList as $key => $value)
          $options[] = array(
          'value' => $value['name'],
          'label' => $value['code'],
          );

          return $options;







          share|improve this answer

























          • That's not the answer. in need to show parent of store view also in similar fashion to the store view switcher, same as image attached in the question.

            – Juliano Vargas
            yesterday













          0












          0








          0







          system.xml :-



          <field id="store_view" translate="label" type="multiselect" sortOrder="13" showInDefault="1" showInWebsite="1" showInStore="1">
          <label>Store view</label>
          <source_model>vendormoduleModelSourceConfigOption</source_model>
          </field>
          <?php


          option.php



          namespace vendormoduleModelSourceConfig;

          class Option implements MagentoFrameworkDataOptionSourceInterface


          protected $eavConfig;


          public function __construct(
          MagentoStoreModelStoreManagerInterface $storeManager
          )

          $this->_storeManager = $storeManager;



          public function toOptionArray()

          $storeManagerDataList = $this->_storeManager->getStores();
          $options = array();

          foreach ($storeManagerDataList as $key => $value)
          $options[] = array(
          'value' => $value['name'],
          'label' => $value['code'],
          );

          return $options;







          share|improve this answer















          system.xml :-



          <field id="store_view" translate="label" type="multiselect" sortOrder="13" showInDefault="1" showInWebsite="1" showInStore="1">
          <label>Store view</label>
          <source_model>vendormoduleModelSourceConfigOption</source_model>
          </field>
          <?php


          option.php



          namespace vendormoduleModelSourceConfig;

          class Option implements MagentoFrameworkDataOptionSourceInterface


          protected $eavConfig;


          public function __construct(
          MagentoStoreModelStoreManagerInterface $storeManager
          )

          $this->_storeManager = $storeManager;



          public function toOptionArray()

          $storeManagerDataList = $this->_storeManager->getStores();
          $options = array();

          foreach ($storeManagerDataList as $key => $value)
          $options[] = array(
          'value' => $value['name'],
          'label' => $value['code'],
          );

          return $options;








          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited yesterday

























          answered yesterday









          Ronak RathodRonak Rathod

          1,125213




          1,125213












          • That's not the answer. in need to show parent of store view also in similar fashion to the store view switcher, same as image attached in the question.

            – Juliano Vargas
            yesterday

















          • That's not the answer. in need to show parent of store view also in similar fashion to the store view switcher, same as image attached in the question.

            – Juliano Vargas
            yesterday
















          That's not the answer. in need to show parent of store view also in similar fashion to the store view switcher, same as image attached in the question.

          – Juliano Vargas
          yesterday





          That's not the answer. in need to show parent of store view also in similar fashion to the store view switcher, same as image attached in the question.

          – Juliano Vargas
          yesterday

















          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%2f268940%2fmagento-2-store-view-multiselect-in-system-xml%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

          Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

          Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

          Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림