Magento cookies

Cookies in Magento are easy to work with. There may be a need to use cookies to pass data to or from Magento whether it is to identify users, track users or some other case. The Magento core has a cookie model to set, get and delete cookies. ┬áSo let’s get started with the code and some descriptions for usage. … Continue reading

Manual database calls

Connect and query Magento data Recently we had a need to incorporate a third party app into a Magento system. That got us thinking about using data between Magento and the app. To start, you should include the path to Magento. Specifically app/Mage.php file require(dirname(__FILE__) . ‘/app/Mage.php’); You will need to initialize the Magento application object. Mage::app(); We can now … Continue reading

List all payment methods in Magento

How to get a list with all available payment methods in Magento. If for any reason you need to a get a list with all payment methods in Magento, you can do it easily by using the payment config class (app/code/core/Mage/Payment/Model/Config.php). To get a list with all payments active and inactive: $allAvailablePaymentMethods = Mage::getModel(‘payment/config’)->getAllMethods(); To get a list with all … Continue reading