Skip to main content

Posts

Showing posts with the label Product

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

Product.getLastModified() is Not changing on price change

In cartridge code in SFCC, how to find if product price have changed recently. In case product.getLastModified() is not changing on price change. There is no built in way to do this. I suggest using ProductPriceInfo. You can get priceBook information for any product by Product.getPriceModel(), which returns a instance of ProductPriceModel. This class has a method getPriceInfo(), which will return a ProductPriceInfo class instance with attribute priceInfo : String, which you can use to store information about the date of change for a given price point for a product. Demandware Docs