We have a block that calls a phtml file that reads an external json stream to fill in some data on the fly. I want to add in a switch-case that reads the store name so I can change some variables around for my stream. I know in magento1 i could do it easily with
how do I do this in Magento2?
Solved! Go to Solution.
Edited your reply slightly:
$om = \Magento\Framework\App\ObjectManager::getInstance();
$manager = $om->get('Magento\Store\Model\StoreManagerInterface');
$store = $manager->getStore(null)->getName();
Still marking as solution, thank you.