标签:
$attributes = Mage::getSingleton(‘catalog/config‘)->getProductAttributes(); $collection = Mage::getModel(‘catalog/product‘) ->getCollection() ->addAttributeToFilter(‘entity_id‘, array(‘in‘ => $productIds)) ->addAttributeToSelect($attributes); $collection->getSelect()->order(new Zend_Db_Expr(‘FIELD(e.entity_id, ‘ . implode(‘,‘, $productIds).‘)‘));
magento sort array product IDs
标签:
原文地址:http://my.oschina.net/liufeng815/blog/522265