php - Magento "getCategories()" returns empty array -
I am trying to list all the categories of the site using the following code:
Public Function ShowConcation Actions () {var_dump ($ this-> getCategories ()); }
However, this empty array is returning. I have several sites that are using the above code and they are returning category lists without any problems. I do not think so for this two special site. Their systems have categories and they are visible. Not sure what is wrong or how can I fix it.
Additionally, in other sites the system & gt; Configuration
is there list
, but what is not working is system & gt; Configuration & gt; List
. I'm not sure there is a difference between these two.
Try it to get all the categories,
$ categories = Mage :: MillModel ('Catalog / Category') - & gt; GetCollection () - & gt; Add attitudes select ('*') - & gt; Add Efficient Filter ();
Comments
Post a Comment