How to get Current Category in Magento?

Posted by Damodar Bashyal on March 07, 2012

 

In Magento, If you are on category page than it's easy to get current category.

$_current_category=$this->getCurrentCategory();

or,

$_current_category = Mage::registry('current_category');

I needed Current Category on product info page and on the footer.phtml files. Because I had custom background set for each Category. So, Below code helped me to find the Current Category in my Magento's phtml file.

More»

How to access website using SSH using PUTTY

Posted by Damodar Bashyal on March 07, 2012

 

This applies for CPANEL and you need to have proper rights to use SSH.

More»

Magento:: How to Export Customer ID with Import/Export Profile

Posted by Damodar Bashyal on March 02, 2012

 

I was struggling to export Customer ID (entity_id) for some time. I thought it should be straight forward. But it wasn't, so after googling for a while I found this solution.

solution 1:

Override file: app\code\core\Mage\Customer\Model\Convert\Parser\Customer.php

and update function unparse();

previous:

$systemFields = array();
foreach ($this->getFields() as $code=>$node)
{
    if ($node->is('system'))
    {
	    $systemFields[] = $code;
    }
}

More»