Get product from Url

Is there any way to get a product-object from the public website Url?
If so, how do you do it?

Litium version: 4.8.2

1 Like

Do you mean an URL like: ?

You can use the last part – special-pants-1234 – to get the Article.

// Get the article by urlName (last segment of the articles url) and language. 
Article article = Article.GetArticle(languageID, urlName, FoundationContext.Token);

Seem to be working fine, thank you!