Navigation Menu

Multi-site Catalog Assignment


ProfilePropertyServlet in DAF Pipeline has a property profilePropertySetters to set site specific properties.

#/atg/dynamo/servlet/dafpipeline/ProfilePropertyServlet    

profilePropertySetters+=/atg/userprofiling/CatalogProfilePropertySetter,\
                                        /atg/userprofiling/PriceListProfilePropertySetter

CatalogProfilePropertySetter calls the determineCatalog method of the atg/commerce/catalog/CatalogTools component.

determineCatalog invokes the /atg/commerce/util/ContextValueRetriever component, which is the primary mechanism for identifying the catalog to assign so that the appropriate items can be displayed.

determineCatalog uses the boolean property ‘useProfile’ in the component ContextValueRetriever component to determine whether the site’s catalog to be used or not.

  • If the useProfile property is set to true, in case of a logged in user, the catalog assigned to the profile will be used and not the one from the site.
  • If the useProfile property is set to false and if there is current site, the defaultCatalog from site configuration of he current site is used.
  • If the useProfile property is set to false and if there is no current site, the defaultCatalog from CatalogTools component is used.

ContextValueRetriever.useProfile is set to false by default, so that it takes the catalog from site.

We need to :
  • Set the defaultCatalog property for all the siteConfiguration item. This need to be done via BCC.
  • Set the deaultCatalog in the CatalogTools component, only if you need a catalog when there is no site selected.
Profile.catalog will return the catalog from the site configuration. This is because the useProfile property in /atg/commerce/util/ContextValueRetriever component is set to false by default.


No comments :