Previous Order Block

Has anyone ever coded or tried creating a block (cscart v3) that contains previously purchased products?

I am looking to show the user on product details page a block of their past purchased items as a reference for what they might want to buy as they are shopping.

Trying to figure this out