As described in Configuring Commerce Options in Site Administration, you select default catalog and (optionally) price lists for each site in your multisite environment during initial configuration. This section describes how Oracle ATG Web Commerce determines which catalog and price lists to assign to the user’s profile when a user visits a given site, allowing the appropriate items to display.
For the profile’s catalog
property, the /atg/userprofiling/CatalogProfilePropertySetter
component calls the determineCatalog
method of the /atg/commerce/catalog/CatalogTools
component. This method invokes the /atg/commerce/util/ContextValueRetriever
component. If this component’s useProfile
property is false
(the default), the following logic is applied:
If there is a current site (the application is running in a multisite environment), use the value of the
defaultCatalog
property of thesiteConfiguration
item for the current site.Otherwise, use the value of the
defaultCatalog
property of theCatalogTools
component.
Similar logic is used to set the profile’s priceList
and salePriceList
properties. The /atg/userprofiling/PriceListProfilePropertySetter
component calls the /atg/commerce/pricing/priceLists/PriceListManager
component’s determinePriceList
method, which calls ContextValueRetriever
.
For more information on the ContextValueRetriever
, see ContextValueRetriever Class.