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;
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>

Is it possible at all the way magento has build this?
magento2.2.2 store-view system.xml
add a comment |
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>

Is it possible at all the way magento has build this?
magento2.2.2 store-view system.xml
add a comment |
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>

Is it possible at all the way magento has build this?
magento2.2.2 store-view system.xml
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>

Is it possible at all the way magento has build this?
magento2.2.2 store-view system.xml
magento2.2.2 store-view system.xml
asked yesterday
Juliano VargasJuliano Vargas
591523
591523
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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;
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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;
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
add a comment |
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;
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
add a comment |
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;
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;
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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