How to Solve Magento 500 Internal Server Errors


Many users encounter some weird magento internal server errros (Error type 500). I will try to list the most common solutions. These errors are not always caused by the same reason. You should try to take a look at your server’s error logs to get some help about this error.

You can get additional info about the errors by Turning on Developer Mode. Look in the Magento bootstrap file (index.php), you’ll see lines similar to the following

#Mage::setIsDeveloperMode(true);
#ini_set(‘display_errors’, 1);

Uncomment these. In a production system, you’d never want to have your errors display to the browser, but while developing having an errors and warnings thrown immediately in your face is invaluable. This way, you will see the actually problem which lead to the Internal Error Server. In almost cases, the reason is that there is an exception throw after output is sent to browser.

Continue reading

Advertisements

Magento theme development


Menu


Top user menu

<?php echo $this->getChildHtml('topLinks'); ?>

To main menu

 

<?php echo $this->getChildHtml('topMenu'); ?>

Top shopping cart

<?php echo $this->getChildHtml('headerCart') ; ?>

Top search

<?php echo $this->getChildHtml('topSearch'); ?>

Add extra link in top user menu:

<reference name="top.links">
    <action method="addLink" translate="label title"><label>Shop</label><url>abc</url><title>Shop</title><position>1</position></action>
</reference>
<reference name="top.links">
    <action method="removeLinkByUrl"><url helper="customer/getAccountUrl"/></action>
</reference>

Add extra link in bottom menu

 

<reference name="footer">
    <block  as="footer_link_cms"  type="cms/block" name="cms_footer_links" before="footer_links">
        <action method="setBlockId"><block_id>footer_links</block_id></action>
    </block>
</reference>

 

<reference name="footer_links">
    <action method="removeLinkByUrl"><url helper="catalog/map/getCategoryUrl"/></action>
</reference>

Remove block

<default>
    <remove name="footer_links"/>
</default>

Add static block

 

<reference name="footer">
    <block  as="callstaticblock" type="cms/block" name="callstaticblock" before="footer_links">
        <action method="setBlockId"><block_id>footer_links</block_id></action>
    </block>
</reference>

Tree menu

<reference name="footer">
    <block type="catalog/navigation" before="nab_pict" name="treemenu" template="catalog/navigation/tree_menu.phtml" />
</reference>

Add static block anywhere

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('footer_links')->toHtml() ?>

Add block anywhere

<?php echo $this->getLayout()->createBlock('catalog/product_new')->setTemplate('catalog/product/new.phtml')->toHtml(); ?>