Display Image Category above 2 columns left page


The category banner (image) comes from template/catalog/category/view.phtml like this

if ($_imgUrl = $_category->getImageUrl()) { $_imgHtml = '<div class="category-image-container"><div class="category-image-container-inner"><p class="category-image"><img src="'.$_imgUrl.'" alt="'.$this->htmlEscape($_category->getName()).'" title="'.$this->htmlEscape($_category->getName()).'" /></p></div></div>'; $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image'); } first comment this

Then in template/page/2columns-left.phtml between<div class="main"> and <div class="col-left"><?php echo $this->getChildHtml('left') ?></div>

write the category banner code

<?php   
        $_category  = Mage::registry('current_category');
        if($_category){
         $_helper    = Mage::helper('catalog/output');

            $_imgHtml   = '';
            if ($_imgUrl = $_category->getImageUrl()) {
           echo   $_imgHtml = '<div class="category-image-container1"><div class="category-image-container-inner"><p class="category-image"><img src="'.$_imgUrl.'" alt="'.$this->htmlEscape($_category->getName()).'" title="'.$this->htmlEscape($_category->getName()).'" /></p></div></div>';
                $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image');
            }
        }
        ?>

This will show the category banner above the left column and the content.

How to remove index.php URLs in Magento


1) Login to admin section by using the URL

http://domain.com/index.php/admin

2) then go to “System >>  Configuration >>Web >> Search Engines Optimization”
Use Web Server Rewrites : YES

3) Go to “System >>  Configuration >>Web >>Secure”

Use secure URL Frontend: YES

4)Then create the .htaccess file under your the magento installed folder.

If the magento installed under document root ( /home/username/public_html) then add follogig rules into .htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

and If the magento installed under /shop or directory then add the following rules into ” /home/username/public_html/shop/.htaccess ” file.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /shop/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /shop/index.php [L]
</IfModule>