What is the best way to create global variables which can be used everywhere in Magento?

  • Creating a empty module and adding a system.xml file to it
  • Using the Magento Admin panel: System > Custom Variables > create a new custom variable
  • Via a Magento Session $myValue = ‘Hello World’; Mage::getSingleton(‘core/session’)->setMyValue($myValue);
  • $myValue = ‘Hello World’; Mage::getModel(‘core/variable’)->addMyValue($myValue);

Тупой индус взял вопрос отсюда: stackoverflow.com/questions/949779
Как ни странно, тупой индус счёл верным вариант 1.
Вариант 3 тупой индус не счёл верным, потому что для него он создал другой вопрос: What is the best way to store session values in Magento?