Set Allowed Countries in Store View
In Magento 1.4, I was able to install allowed countries
at a level Store View
, so I could have Website
with one Store
and more Store Views
for each of my countries:
Now in Magento 2 I can install allowed countries
on Website
and not on Store View
, the setup Store View
looks like this:
Why do I want to change this? I need to set a different one store contact address
for each of these Store View
s because I, for example. there is Argentinian and Bulgarian Store View
, so I want to set different addresses but use the same Website
/ Store
.
Unfortunately I also cannot change store contact address
per Store View
, this also only works at the level Website
.
Am I missing something? Was there a logical change from 1.X to 2.X relative Store Views
?
source to share
the correct answer, which is about Magento 2 standardization, is overloading system.xml magento / Backend / etc / adminhtml. You should try: Manufacturer / ModuleName / etc. /adminhtml/System.Xml
<?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>
<section id="general">
<group id="country" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Country Options</label>
<field id="allow" translate="label" type="multiselect" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Allow Countries</label>
<source_model>Magento\Directory\Model\Config\Source\Country</source_model>
<can_be_empty>1</can_be_empty>
</field>
</group>
</section>
</system>
</config>
Don't forget to add an overridden module - Magento_Backend
Vendor / ModuleName / etc. /module.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Vendor_YourModule" setup_version="1.0.0">
<sequence>
<module name="Magento_Backend"/>
</sequence>
</module>
</config>
source to share