Currently, I'm getting my values like:
$this->_scopeConfig->getValue('settings/basics/language', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
But this, of course, gets me the default value.
How do I get the config value of a certain store view?
Best Answer
When you look into
Magento\Framework\App\Config\ScopeConfigInterface
ingetValue()
methodThis method accept the 3 parameter
$path
The path through the tree of configuration values e.g.,'general/store_information/name'
$scopeType
The scope to use to determine config value, e.g.,'store'
or'default'
$scopeCode
So If you want to get store config by store wise then you just need to pass
second
(so you can define you want value asstorewise
orwebsite
) as well as third parameter (you can pass yourstore code
here).Now you can get store config value by