Search This Blog

Tuesday, July 5, 2011

Magento get root category id or magento getRootCategory or function to get root category id or magento getRootCategory()

Mage::app()->getWebsite(true)->getDefaultStore()->getRootCategoryId()

2 comments:

  1. The param to getWebsite is the websiteId which is default 1:

    Mage::app()->getWebsite(1)->getDefaultStore()->getRootCategoryId()

    ReplyDelete
  2. Very Good Post. It is very helpful me.

    Thanks :)

    ReplyDelete