quick magento tips


// get user ip
Mage::helper('core/http')->getRemoteAddr(true));

// get user session id
Mage::getModel("core/session")->getEncryptedSessionId());

// update database config on the fly
Mage::getModel('core/config')->saveConfig('payment/worldpaydirect/merchant_id', '1111111'); 
Mage::getConfig()->reinit();
Mage::app()->reinitStores();
Like it.? Share it:

Comments are closed.