How to get particular level of category in magento 1.7.0.2 -


i using magento 1.7.0.2 want level of category.

for example, have categogory tree following

allcategory->mobile->samsung allcategory->clothing->men allcategory->laptop->dell 

here want access second level category means mobile,clothing,laptop

so how that

please me thank in advance.

$categories = mage::getmodel('catalog/category')                 ->getcollection()                 ->addattributetoselect('*')                 ->addisactivefilter()                 ->addattributetofilter('level',2) 

basically add ->addattributetofilter('level',2)


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -