1

We are using the Hybris platform, and our products URL are like below.

I am new to Hybris platform but I know about URL structure, and I think something is going wrong here. I've checked other Hybris sites and other Hybris sites have short and clean URLs. Any suggestion?

http://shop.cintas.com/store/site/c/Southport-Skirt/p/11361733?searchText=:price-asc&plpcategoryCode=Eco
http://shop.cintas.com/store/site/Apparel/Headwear/Knit-Cap/p/00013120?searchText=:price-asc&plpcategoryCode=Apparel
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48

3 Answers3

3

You can change the URLs by changing the ProductModelUrlResolver and ProductDataUrlResolver. Hybris uses them to determine the URL for products throughout the system. Keep in mind, that the URL needs to end with the pattern of the ProductPageController "/**/p/{productCode}".

You can replace the bean declaration. There is even some possibility to configure the resolvers via a URL pattern (see attribute "defaultPattern" of ProductModelUrlResolver). However for further adaptions, you need to change the implementation of the classes.

See classes:

de.hybris.platform.commerceservices.url.impl.DefaultProductModelUrlResolver
de.hybris.platform.commercefacades.url.impl.DefaultProductDataUrlResolver

and corresponding beans:

productModelUrlResolver
productDataUrlResolver

See also my post here: How to normalize URLs in Hybris

Johannes von Zmuda
  • 1,814
  • 8
  • 14
0

These urls generated by Apparel sample accelerator, you can create your own URL Strategy. You need development for it.

mkysoft
  • 5,392
  • 1
  • 21
  • 30
0

Your question is very common... So hard to answer... But for the ProductPageController there is a logic that all sites on

/**/p/{productCode}

Are handled by the ProductPageController. There is a logic that pages ends with /p/{productCode} will handle the request and replace the front part with the name of a product,...

Mabye this helps you and you can more specify your question?

BR

Mafick
  • 1,128
  • 1
  • 12
  • 27
  • I mean is there any way to remove CGI parameters? – Janak Chapaneri Apr 16 '19 at 19:49
  • Hmm,.. the parameter comes from the SOLR search,... I think there is defintly a way to hide them (GET /POST). But this is jsut only if you do a solr search on the page,... – Mafick Apr 17 '19 at 17:50