Introduced in Feature Pack 1

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.

Feature Pack 1The Catalogs tool displays shared attributes. You cannot update or add new attributes to the dictionary.

Introduced in Feature Pack 2Beginning with Feature Pack 2 you can update attributes by using the attribute dictionary.

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

This procedure applies to the Deprecated featureConsumer Direct sample store and the Deprecated featureAdvanced B2B direct sample store. If your store is using the Deprecated featureMadisons starter store, see ../../com.ibm.commerce.management-center.doc/tasks/tpn_attribdic_roadmap.html.
  1. To enable the attribute dictionary and non-attribute dictionary attribute concurrently, switch the implementation of ResolveSkuCmd to ResolveSkuAllCmdImpl in CMDREG table:
    1. Open a database command window.
    2. Run the following SQL command:
      update cmdreg set classname='com.ibm.commerce.catalog.commands.ResolveSkuAllCmdImpl' where interfacename ='com.ibm.commerce.catalog.commands.ResolveSkuCmd';
  2. 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';
    3. Hiding attributes that are not contained in the attribute dictionary to prevent users from using the table to create an attribute in the legacy table.
      Note: To change the ResolveSkuCmd implementation for one store, you create a row in the CMDREG table with the STOREENT_ID set to the store ID. If you set the STOREENT_ID to "0", the command applies to all the stores.

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\Madisons\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>
Feature Pack 5 or laterThe 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>