Your task is to help provide a solution to sort the merged paginated collection. The following line of code does sort the collection but the pagination doesn't work:
$singleProducts = $singleProducts->sortBy('onevariant.list_price',SORT_REGULAR,true);
Without the line of code above then, the pagination work but the collection is not sorted.
Attached is the code for your kind preview. You are required to work on this task remotely.