Magento automatically assign product to parent categories

Posted by Damodar Bashyal on July 22, 2013

 

It was good to find something that I didn't realise it existed in magento before today. Client had provided csv of products with only deepest child category. I needed to display product in that child category and it's parent categories above it.

More»

Magento attributes - get admin label for attribute options

Posted by Damodar Bashyal on July 16, 2013

 

We had custom module to display color boxes instead of color labels for colour selection. In the magento admin we had set label 'White' for admin / default but '#ffffff' for magento store frontend, so we can use it on style background color. See image for more details about this requirement and issue.

More»

Magento get current store information

Posted by Damodar Bashyal on July 08, 2013

 

Here are some of the codes that will help retrieving information about the current or selected store.

Load store object with below code. This will load current store by default unless you pass store id.

$store = Mage::app()->getStore(); // see below for magento core function

More»