Sources: magento 2 How to get store Id phtml et How to get store information in Magento 2.
Exemple d’informations exploitables dans un fichier PHTML:
1 2 3 4 5 6 |
echo $block->getStoreId() . '<br />'; echo $block->getStoreCode() . '<br />'; echo $block->getWebsiteId() . '<br />'; echo $block->getStoreName() . '<br />'; echo $block->getStoreUrl() . '<br />'; echo $block->isStoreActive() . '<br />'; |