Enabling the attribute dictionary

If you are using an external catalog, you can save time by using the attribute dictionary to load attributes for your products.

Before you begin

Decide whether to use the attribute dictionary, or use attribute dictionary and non-attribute dictionary attributes concurrently. Non-attribute dictionary functionality does not provide you with the capability of sharing attributes between catalog entries. Non-attribute dictionary attributes are only created, managed, and used for a single catalog entry. Attribute dictionary attributes can be reused by multiple catalog entries, and can be managed in a single location, with changes reflected in all catalog entries that use the attribute.

Procedure

To enable the attribute dictionary only, switch the implementation of ResolveSkuCmd to ResolveSkuNewCmdImpl in the CMDREG table:
  1. Open a database command window.
  2. Run the following SQL command:
    update cmdreg set classname='com.ibm.commerce.catalog.commands.ResolveSkuNewCmdImpl' where interfacename ='com.ibm.commerce.catalog.commands.ResolveSkuCmd';

Example

There are two approaches for accessing the Attribute dictionary from server-side JSP pages for customers who currently use DataBeans to access classic attributes. The first approach is to call the SOA storefront service. The sample JSP file can be found in the following directory WCDE_installdir\workspace\Stores\WebContent\AuroraESite\Snippets\Catalog\CatalogEntryDisplay\CachedProductOnlyDisplay.jsp.

<wcf:getData type="com.ibm.commerce.catalog.facade.datatypes.CatalogEntryType" var="catentry"
expressionBuilder="getStoreCatalogEntryAttributesByID">
<wcf:contextData name="storeId" data="${param.storeId}"/>
<wcf:param name="catEntryId" value="${WCParam.productId}"/>
<wcf:param name="dataLanguageIds" value="${WCParam.langId}"/>
</wcf:getData>
The second approach is to call the new CatalogNavigationView based SOA storefront service. For more information, see CatalogEntry noun and look for the access profiles: IBM_Admin_CatalogEntryAttrDictDescriptiveAttributes_Paging and IBM_Admin_CatalogEntryAttrDictDefiningAttributes The sample JSP file is in the following directory WCDE_installdir\workspace\Stores\WebContent\AuroraStorefrontAssetStore\Widgets\CatalogEntry\CatalogEntryDisplay_Data.jsp.
<wcf:getData type="com.ibm.commerce.catalog.facade.datatypes.CatalogNavigationViewType" var="catalogNavigationView" 
expressionBuilder="getCatalogEntryViewPriceWithAttributesByID" varShowVerb="showCatalogNavigationView" recordSetStartNumber="0">
<wcf:param name=e="UniqueID" value="${catEntryIdentifier}"/>
<wcf:contextData name="storeId" data="${storeId}" />
<wcf:contextData name="catalogId" data="${catalogId}" />
</wcf:getData>