0
Mage::getModel ('eav/config')->getAttribute ('catalog_product', 'brand');
我需要筛选排序为降序排列。
Mage::getModel ('eav/config')->getAttribute ('catalog_product', 'brand');
我需要筛选排序为降序排列。
如果我得到你的权利,你需要做以下步骤:
1)创建一个属性
2)编辑属性设置
进入目录>属性>管理属性集和你的属性添加到属性设置您使用在您的商店。
3)编辑分类
4)重新编制数据
进入系统>索引管理和重新索引数据 -
鉴于“品牌”没有数字值,我不明白你的意思是“降序”。他们将按字母顺序排序。
可能的重复[如何添加“Order By”加载Magento模型时](http://stackoverflow.com/questions/3158424/how-to-add-order-by-when-loading-a-magento -模型) – Pollett