cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Is it possible to handle URLs without delimiters in the storefront?

Former Member
0 Likes
315

I'm working with Hybris 6.2, I'm being asked to modify the way the URLs for the storefront product's details are handle.

The OOTB pattern that is handled is /{category-path}/{product-name}/p/{product-code} according to the information found on this link about SEO URLs(which contains error on the documentation), I have to modify the pattern that is used currently through customization.

The URL I'm being asked to set on the storefront should look like this /{category-path}/{product-name}/{product-code}, but I'm having doubts if Hybris is capable of handling URLs without delimiters like /p/ to difference between the category path, the product name and the product code.

Is it possible to handle these kind of URLs?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Hi ,

Please see this OOTB class : DefaultProductDataUrlResolver and based on the ulr mapping pattern

ProductPageController is calling.

You can override the UrlResolver to change the pattern and based on the you need to change request

mapping pattern in product page controller as well.

Thanks,

Venki

Former Member
0 Likes

Can the pattern not include delimiters? I'm asking due to the OOTB pattern used which contains /c/ and /p/ to delimit the category codes and product code

Former Member
0 Likes

ya , that is the pattern is used request mapping on the controller. you can change it into name instead of /c/, you can write /categorycode/.

If you observe the url for category (xxx/c/xxx)and product(xxx/p/xxx), it contains /c/ and /p/ is using to identify the controller only so you can change as per your requirement.

Request mapping url pattern should be unique to identify the particular controller.

Thanks,

Venki