Magento排序集合

时间:2013-12-27 20:03:59

标签: magento

一切!我有一个集合,但当我尝试对它进行排序时,我没有成功。有我的代码:

$collection = Mage::getModel('novaposhta/warehouse')->getCollection();
$collection->addFilter('city', $city, 'OR');
$collection->addFilter('city_ru', $city, 'OR');
$collection->setOrder('number', 'ASC');
$warehouses = $collection->load();

打印选择

echo $warehouses->getSelect();

给了我

SELECT `main_table`.* FROM `module_warehouse` AS `main_table` WHERE (city='Kiev') OR (city_ru='Kiev') ORDER BY number ASC

但收藏品仍未分类。有什么想法吗?

0 个答案:

没有答案