Multisite functionality allows you to show links to products from other sites while viewing the current site. There are a number of locations where these links could be appropriate. For example, in Commerce Reference Store, cross-site product links appear in the following places:
Search results
Recommended products on the home page
Promotional content items that contain target links
Related products on the product detail page
Gift and wish lists
Shopping cart
Product comparisons
In addition to product links, you may also want to create links to static pages from another site (for example, index.jsp
pages). Commerce includes several servlet beans that facilitate the creation of cross-site links in both cases:
atg.droplet.multisite.SiteIdForItemDroplet
obtains a site ID for a repository item. There are two component instances that are based on this class,/atg/dynamo/droplet/multisite/SiteIdForItem
and/atg/commerce/multisite/SiteIdForCatalogItem
. These components are essentially the same except thatSiteIdForCatalogItem
sets an additional parameter,shareableTypeId
, for convenience.atg.droplet.multisite.SiteLinkDroplet
generates URLs that reference other sites.
The following sections describe how Commerce Reference Store uses these servlet beans to generate its cross-site links.