I think the class Mage_Catalog_Model_Category
already includes the function you are searching. It is called getChildren
:
public function retrieveAllChilds($id = null, $childs = null) { $category = Mage::getModel('catalog/category')->load($id); return $category->getChildren(); }
The function getChildren
returns children IDs comma-separated, getChildrenCategories
returns an array of Mage_Catalog_Model_Category
instances.
If you want to get the children categories recursively, you can use:
public function retrieveAllChilds($id = null, $childs = null) { $category = Mage::getModel('catalog/category')->load($id); return $category->getResource()->getChildren($category, true); }
相关推荐
这种策略可以保证数据的完整性,例如当用户 A 更新完后,B 用户点击“存盘”按钮,我们可以看到 sqlsyntax 返回的 UPDATE 语句,where 条件不成立,因此更新失败,并弹出出错信息:Row changed between retrieve and...
Query Retrieve SCP Emulator
This module demostrates how to retrieve information about a joystick. This is a great module for game programmers.
描述中提到,“This demonstrates how to retrieve the file size from a specified file”,这提示我们关注的是一个实际的代码示例或者教程,它将展示如何从给定的文件路径中获取文件的大小信息。这通常涉及到读取...
Retrieve Web page or file (including all HTTP headers and message body) througn HTTP protocol directly from VB program which utilize the MS WinSock Control.
标题为“an introduction to information retrieve”的文档,实际上是指《信息检索导论》这本书的介绍。该书由斯坦福大学出版,作者包括 Christopher D. Manning、Prabhakar Raghavan 和 Hinrich Schütze。根据描述...
We propose a novel Knowledge-driven Encode, Retrieve, Paraphrase (KERP) approach which reconciles traditional knowledge- and retrieval-based methods with modern learning-based methods for accurate ...
retrieve_data
In order to help mitigate the risk of cross-site scripting, a new feature has been introduced in Microsoft Internet Explorer 6 SP1. This feature is a new attribute for cookies which prevents them from...
In this document, the words "tablet" and "digitizer" are used interchange¬ably to mean all absolute point¬ing or digitizing devices that can be made to work with this interface. The definition is ...
retrieve_sqlite_data
标题中的"PyPI 官网下载 | retrieve-0.0.6.tar.gz"指的是Python的包索引(PyPI)上发布的名为`retrieve`的软件包的一个特定版本,即0.0.6版。PyPI是Python开发者发布自己编写的模块、库或工具的地方,方便其他用户...
Retrieve Form for Data Capture (RFD)
(b) placing SQL keywords, such as select, under the column names they want to retrieve (c) typing a syntactically correct SQL query that uses column and table names similar to the correct column and...
the estimated pose as a prior to retrieve 3D models which accurately represent the geometry of objects in RGB im- ages. For this purpose, we render depth images from 3D models under our predicted pose...
the R method “over”, which provides a consistent way to retrieve indices or attributes from a given spatial object (map layer) at the locations of another. Using this, the R generic “aggregate” is...
标题 "Basic Save and Retrieve Functions" 暗示了这是一个关于在编程环境中保存和恢复数据的基础教程,可能涉及文件操作和程序状态的管理。在描述中没有提供更多的具体信息,但我们可以根据标签 "控件"、"源码"、...
《PyPI官网下载:text-reuse-retrieve-0.1.10.tar.gz——Python库解析与应用》 PyPI(Python Package Index)是Python开发者的重要资源库,它提供了丰富的Python库供全球开发者下载和使用。本文将详细介绍PyPI官网...