Scriptbaker
SCRIPTBAKERAI & Software Engineering
Magento

Magento get store by storecode

[code language=”php”] function _getStoreByCode($storeCode) { $stores = array_keys(Mage::app()->getStores()); foreach ($stores as $id)

· 5 min read

 function _getStoreByCode($storeCode) { $stores = array_keys(Mage::app()->getStores()); foreach ($stores as $id) { $store = Mage::app()->getStore($id); if ($store->getCode() == $storeCode) { return $store; } } return false; } 

S

Scriptbaker Editorial Team

The Scriptbaker editorial team comprises engineers, AI specialists, and digital strategists based in Dubai and Rawalpindi. We write about software development, artificial intelligence, and digital transformation to help organisations build better products. Learn more about us →