Category: magento

  • Create Global Function In Magento

    This code will allow you to add a function that can be called from anywhere within Magento. It extends the helper class 1) Create a file named ‘Mycode.xml’ and copy it to app/etc/modules/ – it should look like this: true local 2) Create the directory app/code/local/Mycode/Function/etc and then create a file named ‘config.xml’ In it […]

  • Magento Set, Retrieve and Unset Session Variables

    To set a Magento session variable: $myValue = ‘Hello World’; Mage::getSingleton(‘core/session’)->setMyValue($myValue); To Retrieve: $myValue = ”; $myValue=Mage::getSingleton(‘core/session’)->getMyValue(); To Unset: Mage::getSingleton(‘core/session’)->unsMyValue(); Note that ‘MyValue’ can be any text you want but ‘set’, ‘get’ and ‘uns’ prefixes are required.

  • Add Linkshare Pixel To Magento

    Add this code to: \app\design\frontend\enterprise\<your theme>\template\checkout\success.phtml

  • Magento: Load Javascript On One Page Checkout

    Add this to page.xml skin_jsjs/myscript.js