We use the following method to group related products based on their category: https://bitbucket.org/magstaging/groupedrelatedproduct/src/master/
Works perfect, thanks to Herve, but we want to extend this code by also adding the cross sell items on the product page.
So what we want to is to display cross sell products on the product page in the same way, when they exists. Best solution would be to use the same template file for both. So that we can check if related or otherwise cross sell exists.
How can we achieve that?