cancel
Showing results for 
Search instead for 
Did you mean: 

Full link to product

Former Member
0 Kudos

Hi!

how i can get full link to product without response or request ?

i get only ActionResult perform(final ActionContext customerReviewModel)

and some like this

private UrlResolver productModelUrlResolver;

productModelUrlResolver.resolve(customerReviewModel.getProduct())); this code return only catalogName/television//p/9999999_1, but for me needed full url.

Accepted Solutions (1)

Accepted Solutions (1)

raghavendra_desu
Contributor
0 Kudos

Hi Danel,

You can get the site context in url by using base site url resolution service.

Please find the below example which will give the full url along with context by passing the above value.

 getSiteBaseUrlResolutionService().getWebsiteUrlForSite(currentSite, getUrlEncodingAttributes(), false,
                 productModelUrlResolver.resolve(customerReviewModel.getProduct())));

Regards,

Raghavendra.

Answers (0)