SaaS CMS has officially launched! Learn more now.

Get Product URL from Guid, id or Code


Hi, Im using 7.5 and need to get a Products URL by using it's GUID, ID or code or even name.

Is this at all possible?



Jan 17, 2014 14:21


You would use the ReferenceConverter to get the ContentLink for your product. You could then use the CMS API:s to load the the product as content, and get the URL that way.

See the "Load a product" sample in this article,


Per Gunsarfs

Jan 17, 2014 14:58


EPiServer Commerce support a variable ways to get product url from its GUID, ID or code, but unfortunately not name - as many products can have "similar" name. 

- If you already have GUID, you can use IContentRepository and UrlResolver to get the product link

- If you already have an ID, you can follow instructions from Per above to get the product link

- If you have the code, it's a bit tricky, you we need to use ICatalogSystem.GetCatalogEntryDto to get the CatalogEntryDto, then the Id. In next releases we might add a new, more convinient way to get the id from the code.

- If you have the name, you can use search to get the exact code/id, as name is not required to be unique then there is no direct way to get the url.



Jan 18, 2014 8:52

To add to Quan's answer, there is acutally an overload of ReferenceConverter.GetContentLink which accepts the code, so no need to use the DTO:s directly in this case.

Jan 20, 2014 8:23
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.