Using below code, collection is filtered. If $productSkus
array is like
Array ( [0] => 5714156000153 [1] => 8690604469871 [2] => 6412616365413 )
after filtering I see the collection is in
Array ( [0] => 8690604469871 [1] => 5714156000153 [2] => 6412616365413 )
sequence. How to do filtering with respect to given sequence?
$collection ->addAttributeToSelect('*')
->addAttributeToFilter('sku', array('in' => $productSkus));
Best Answer
You can try this way.
It defaults to ASC and use addAttributeToSort('sku', 'desc') for DESC.