Tuesday, 15 March 2011

get sub categories from category id Magento -


I am trying to get sub-categories from class ID but more optimized code as database's huge record Are looking for and can not load the entire range.

I have tried below the code working on those local codes, but my server has huge data, which does not work there

  $ cat = Mage :: getModel ('catalog / category') - & gt; Load (13); $ Subcats = $ cat- & gt; Collect Children (); // and $ categories = Dana :: MillModel ('Catalog / Category') - & gt; Match-rank ($ cat_id);   

Please help

  & lt ;? Php $ root = Dana :: MillModel ('catalog / category') - & gt; Load (13); $ SubCat = Explosion (',', $ root- & gt; Matching Children ()); $ Collection = $ route - & gt; Meet Compile () - & gt; Add-attit-to-select ("*") - & gt; Adfindtofilter ("entity_id", array ("in", $ subcut); Forex currency ($ store $ catname) {echo $ catname- & gt; GetName (); }? & Gt;    

No comments:

Post a Comment