For each product in the cart I'm loading its related products.
$related_product_collection = $_product->getRelatedProductCollection() ->addUrlRewrite() ->AddStoreFilter();
But I'm getting the URL of these related products without the category name
<?php echo $relatedProduct->getProductUrl(); ?>
The courses can belong to several categories.
Add a loop through all the categories to get the right one for that related product?
Thanks in advance!