Simplified the getRelatedProducts function to make use of the orm data model