I am filtering product collection like below.
$productSkuString = 'O, C, D, A, F, S'; $productSkus = explode(', ', $productSkuString); $collection = $this->collectionFactory->create() ->addAttributeToSelect('*') ->addAttributeToFilter( 'sku', array('in' => $productSkus) ) ->setStoreId(0) ->load(); return $collection;
The above code filtering the product collection with mentioned skus. but not in the same order of the sku.
I need to load the product with same order where the sku is mentioned.
Currently its loading the product in random order.
Can anyone look into it and update me please