Displaying a new merchandising association type

You can customize the Catalogs tool by adding a new merchandising association type so it is available to the merchandising association grid. In this example, it is assumed that the MASSOCTYPE table contains a merchandising association type called NEWMATYPE as a massoctype_id.

Procedure

  1. Open WebSphere Commerce Developer.
  2. Open and select Enterprise Explorer view.
  3. Complete one of the following steps:
    • WebSphere Commerce Version 7.0.0.0Feature Pack 1In the Enterprise Explorer view, expand LOBTools > WebContent > WEB-INF > src > lzx > commerce > catalog > objectDefinitions.
    • Introduced in Feature Pack 2In the Enterprise Explorer view, expand LOBTools > WebContent > config > commerce > catalog > objectDefinitions.
  4. Open the following file:
    • WebSphere Commerce Version 7.0.0.0Feature Pack 1CatalogCommonObjectDefinitions.lzx
    • Introduced in Feature Pack 2CatalogCommonObjectDefinitions.def
  5. Add the new merchandising association type as a property value to the name property definition as shown in the following example.
    The property values for the merchandising association types are defined in:
    • WebSphere Commerce Version 7.0.0.0Feature Pack 1the catBaseMerchandisingAssociationReferencedCatalogEntries class
    • Introduced in Feature Pack 2the BaseMerchandisingAssociation definition
    OptionDescription
    WebSphere Commerce Version 7.0.0.0Feature Pack 1CatalogCommonObjectDefinitions.lzx WebSphere Commerce Version 7.0.0.0Feature Pack 1
    1. Locate the class definition of catBaseMerchandisingAssociationReferencedCatalogEntries by searching for the following substring: <class name="catBaseMerchandisingAssociationReferencedCatalogEntries" .
    2. Add the code shown in bold:
      <!--- 
          This property definition represents the options for the type of merchandising associations available between two catalog entries. 		-->
              <wcfPropertyDefinition
                  propertyName="name" required="true" displayName="${catalogResources.merchandisingAssociationAssocType.string}">
                  <wcfPropertyValue
                      displayName="${catalogResources.merchandisingAssociationName_REPLACEMENT.string}"
                      value="REPLACEMENT"/>
                  <wcfPropertyValue
                      displayName="${catalogResources.merchandisingAssociationName_ACCESSORY.string}"
                      value="ACCESSORY"/>
                  <wcfPropertyValue
                      displayName="${catalogResources.merchandisingAssociationName_UPSELL.string}"
                      value="UPSELL"/>
                  <wcfPropertyValue
                      displayName="${catalogResources.merchandisingAssociationName_XSELL.string}"
                      value="X-SELL"/>
      
                  <wcfPropertyValue
                      displayName="${extCatalogResources.merchandisingAssociationName_NEWMATYPE.string}"
                      value="NEWMATYPE"/>  
        
              </wcfPropertyDefinition>
    3. Save your changes. WebSphere Commerce Developer compiles the code to produce an updated ManagementCenter.swf file under the WCDE_installdir\workspace\LOBTools\WebContent directory.
    Introduced in Feature Pack 2CatalogCommonObjectDefinitions.def Introduced in Feature Pack 2
    1. Locate the BaseMerchandisingAssociation definition by searching for the following substring: definitionName="BaseMerchandisingAssociation" .
    2. Add the code shown in bold:
      <!--- This property definition represents the options for the type of
      	merchandising associations available between two catalog entries. -->
      <PropertyDefinition
         displayName="${catalogResources.merchandisingAssociationAssocType}"
         propertyName="name" required="true">
         <PropertyValue
            displayName="${catalogResources.merchandisingAssociationName_REPLACEMENT}"
            value="REPLACEMENT"/>
         <PropertyValue
            displayName="${catalogResources.merchandisingAssociationName_ACCESSORY}"
            value="ACCESSORY"/>
         <PropertyValue
            displayName="${catalogResources.merchandisingAssociationName_UPSELL}"
            value="UPSELL"/>
         <PropertyValue
            displayName="${catalogResources.merchandisingAssociationName_XSELL}"
            value="X-SELL"/>
         <PropertyValue
            displayName=
               "${extCatalogResources.merchandisingAssociationName_NEWMATYPE}"
            value="NEWMATYPE"/>
          <MerchandisingAssociationReplacementTypeValidator package="cat"/>
      </PropertyDefinition>
    3. Save your changes.