getCollection(); $eavAttributeTable = Mage::getSingleton('core/resource')->getTableName('eav/attribute'); $categoryEntityVarcharTable = (string)Mage::getConfig()->getTablePrefix() . 'catalog_category_entity_varchar'; $collection->addAttributeToSelect('name'); $collection->getSelect()->join(array('cev'=>$categoryEntityVarcharTable), 'cev.entity_id = e.entity_id', array()) ->join(array('ea'=>$eavAttributeTable), 'cev.attribute_id= ea.attribute_id', array()) ->where("cev.value='Root Catalog'"); $collection = $collection->load(); foreach($collection AS $category) { echo $category->getName(); } ?>
Magento 非实体模型访问
最新推荐文章于 2019-04-08 00:36:00 发布