I have a multi store view with different languages to describe the product. Each store has a different locale defined.
I have this code
$shops = $this->_storeManager->getStores();
$store_locales = array();
foreach ($shops as $shop){
$store_locales[$shop->getName()] = array();
$store_locales[$shop->getName()][] = $shop->getId();
$store_locales[$shop->getName()][] = $this->_scopeconfig->getValue('general/locale/code', \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $shop->getId());
}
and now i need to load a product desciption specifying a store id.
Any idea?
Best Answer
Complete untested (sorry!). But as long as you have the product ID you should be able to use the
getAttributeRawValue
function on the resource model.If you're happy to load the full product model then do the following instead.