Skip to main content
added 144 characters in body
Source Link
$this->_collection->getSelect()->order("FIND_IN_SET(e.entity_idsku,'1'" . implode(',2',3'$skus) . "') DESC");

or better

$this->_collection->getSelect()->order(new \Zend_Db_Expr("find_in_set(e.sku,'" . implode(',',$skus) . "') DESC"));

for me it works but main condition is DESC because in other way this entity_iditems will be missing

$this->_collection->getSelect()->order("FIND_IN_SET(e.entity_id,'1,2,3') DESC");

for me it works but main condition is DESC because in other way this entity_id will be missing

$this->_collection->getSelect()->order("FIND_IN_SET(e.sku,'" . implode(',',$skus) . "') DESC");

or better

$this->_collection->getSelect()->order(new \Zend_Db_Expr("find_in_set(e.sku,'" . implode(',',$skus) . "') DESC"));

for me it works but main condition is DESC because in other way this items will be missing

Source Link

$this->_collection->getSelect()->order("FIND_IN_SET(e.entity_id,'1,2,3') DESC");

for me it works but main condition is DESC because in other way this entity_id will be missing