I have two store available in Magento
- Default store View
- German Store
In Default Store View I have one tab Blog => General => Store Information. I stored value from this field and it will be store in General => General => Store Information.
But in German Store View which value i fill in Blog=> General => Store Information that will be not stored in General => General => Store Information.
How it is possible that I can store value in General => General => Store Information which I fill in Blog => General => Store Information in German Store View?
Please help me...
Model/Observer/Storeinfo.php
$store = $this->_request->getParam('store'); if($store == '1') { $showTemplateHint = $this->_scopeConfig->getValue('general_tab/general/display_text', \Magento\Store\Model\ScopeInterface::SCOPE_STORE); echo "Default :- ".$showTemplateHint; exit; $this->resourceConfig->saveConfig('general/store_information/name', $showTemplateHint, 'default', 0); } if($store == '2') { $showTemplate = $this->_scopeConfig->getValue('general_tab/general/display_text', 2); echo "German :- ".$showTemplate; exit; $this->resourceConfig->saveConfig('general/store_information/name', $showTemplate, 'stores', 2); }
$this->scopeConfig->getValue('section id/group id/field id', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
or try this magento.stackexchange.com/questions/112821/…