Skip to main content

Web Developers


Comments

Popular posts from this blog

Variation Group in SFCC

Variation Group in SFCC Technically a variant could be in multiple groups. One way to do this is to get the ProductVariationModel of that variant's master. Then you could set the selected value (setSelectedAttributeValue(String, String)) of the attribute your group is represented by. Finally you can get the collection of groups (getVariationGroups()) that share that selected value. Demandware Docs

Response Structure coming from OCAPI

Is there anyway to change the response structure coming from OCAPI? There are hooks for certain OCAPI endpoints that you can use to modify the output.If need something more specific and it goes with use case ... create a custom controller to get what you need in a certain format.

How to create dynamic urls without actually having sub-categories ?

How to create dynamic urls without actually having sub-categories ? By using only root categories, without sub categories and use search refinements to get desired results page. We can use dw.web.URLUtils class to create links from code. Use $url$ content link function to create links from content. Use Search-Show as controller route, add prefnX and prefvX parameters to apply the needed refinements where X is a number starting from 1