Please Follow Below steps to resolved such error of store switcher :
– Follow the below steps to resolve the switcher issue.
Step 1: You need to override the following file of the vendor module as mentioned below.
Override this File in your module :
1 |
vendor/magento/module-store/etc/di.xml |
Step 2: Replace the following code :
1 2 3 4 5 6 7 8 9 10 |
<type name="Magento\Store\Model\StoreSwitcher"> <arguments> <argument name="storeSwitchers" xsi:type="array"> <item name="cleanTargetUrl" xsi:type="object">Magento\Store\Model\StoreSwitcher\CleanTargetUrl</item> <item name="manageStoreCookie" xsi:type="object">Magento\Store\Model\StoreSwitcher\ManageStoreCookie</item> <item name="managePrivateContent" xsi:type="object">Magento\Store\Model\StoreSwitcher\ManagePrivateContent</item> <item name="hashGenerator" xsi:type="object">Magento\Store\Model\StoreSwitcher\HashGenerator</item> </argument> </arguments> </type> |
with
1 2 3 4 5 6 7 8 9 |
<type name="Magento\Store\Model\StoreSwitcher"> <arguments> <argument name="storeSwitchers" xsi:type="array"> <item name="cleanTargetUrl" xsi:type="object">Magento\Store\Model\StoreSwitcher\CleanTargetUrl</item> <item name="manageStoreCookie" xsi:type="object">Magento\Store\Model\StoreSwitcher\ManageStoreCookie</item> <item name="managePrivateContent" xsi:type="object">Magento\Store\Model\StoreSwitcher\ManagePrivateContent</item> </argument> </arguments> </type> |
Clean the cache and You are done.
If you want to show the different contents for Mobile...
Please follow the below methods to get the attribute options...
Update product attribute value programmatically in Magento 2 . [crayon-6287812255346283701567/]...
If you want restrict customer to checkout based on your...
Sometime we need to set html data without load or...