简体   繁体   中英

How to remove url properties in SAP Commerce / Hybris?

Our SAP Commerce / Hybris shop has the following url properties at the product detail page: ?siteUid=test&siteName=test-Onlineshop&metaRobots=index%2Cfollow&multiDimensionalProduct=true

Is it possible to hide them, without breaking the shop?

I think Hybris OOTB doesn't have mentioned query parameters included in the product URL, so I don't know how it's been used in your project and how you form the URL. But yes, you can get rid of it if you know its use cases.

say, If you are using these attributes on the storefront to render the data/page, you can send these attributes as a model attributes or part of a product data object.

eg model.addAttribute("multiDimensionalProduct", TRUE); You can add those attributes in ProductPageController or before view controller or anywhere in the filter chain where it's available. you can get its value using ${multiDimensionalProduct}

If you have any use case for serverside, you can store/get attributes from a session. For instance, in your given URL you can easily get siteUid & SiteName from the session site (cmsSite) object.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM