In addition to the ShoppingCartShareableType component that comes configured out of the box, Commerce Reference Store implements a second ShareableType component, /atg/store/RelatedRegionalStoresShareableType. RelatedRegionalStoresShareableType is a non-Nucleus shareable type component that represents the concept of regional peers of the same store. Commerce Reference Store has a sharing group, Related Regional Stores, that includes the ATG Store US and ATG Store Germany sites, along with the RelatedRegionalStoresShareableType component. This configuration indicates that ATG Store US and ATG Store Germany are regional peers.

Commerce Reference Store JSP code uses the /atg/dynamo/droplet/multisite/SharingSitesDroplet to determine which other sites are in a Related Regional Stores sharing group with the current site; for example, when ATG Store US is the current site, the SharingSitesDroplet returns ATG Store Germany, and vice versa. This approach allows Commerce Reference Store to implement one generic piece of JSP code that renders a widget that allows shoppers to switch among regional peer sites (see Rendering the Store and Country Pickers for more details and a code example). This approach also eliminates the need for site-specific JSP code that says “if site A is the current site, render widgets for sites B and C; if site B is the current site, render widgets for sites A and C, and so on.” Adding a new site to a group of regional peers only requires adding the site to the Related Regional Stores sharing group in Site Administration. No JSP code needs to change in order to retrieve and render the additional regional peer (although presentation code may need to change if there is not enough room for the additional site to appear in the UI).

The RelatedRegionalStoresShareableType component is defined in the /atg/store/ file found in Commerce Reference Store’s Store.Estore.International module. Its definition looks like this:


# The shareable type ID used by application code

# Information used to find strings appropriate for localized UIs

For more details on rendering the country picker in Commerce Reference Store, see Changing Site Context. For an overview of non-Nucleus shareable type components, see the ATG Multisite Administration Guide. For details on creating non-Nucleus shareable type components, see the Multisite Request Processing chapter of the ATG Platform Programming Guide.

Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved. Legal Notices