Wednesday, August 14, 2013

Change default home to any page in magento or create a new landing page for magento

First go to CMS -> pages -> Add New page.

After saving details of new page,
go to system -> configuration -> Web -> Default pages
Save this Configurations as show in screen-shots.And go to your homepage url

e.g. http://localhost/magento



PHP Extensions "0" must be loaded.

It appears that one of the configuration XML files, namely magento/app/code/core/Mage/Install/etc/config.xml isn't parsed correctly by PHP 5.4

To fix this error, open above file  and replace
         <extensions>
            <pdo_mysql/>
        </extensions>
with
        <extensions>
            <pdo_mysql>1</pdo_mysql>
        </extensions>

Now, you will be able to proceed the installation.

Session management in Magento

To set the value of Magento session variable:

$theValue = 'Bhavana';
Mage::getSingleton('core/session')->setMySessionvariable($theValue);

You can retrieve the value of session variable as following:
Mage::getSingleton('core/session')->getMySessionvariable();

To unset the value of session variable:
Mage::getSingleton('core/session')->unsMySessionvariable();

Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method... magento 2

Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method and must therefore be declared abstract or implement the remaining met...