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
- Open WebSphere Commerce Developer.
- Open and select Enterprise Explorer view.
- Complete one of the following steps:
In the Enterprise Explorer view, expand LOBTools > WebContent > WEB-INF > src > lzx > commerce > catalog > objectDefinitions.
In the Enterprise Explorer view, expand LOBTools > WebContent > config > commerce > catalog > objectDefinitions.
- Open the following file:
CatalogCommonObjectDefinitions.lzx
CatalogCommonObjectDefinitions.def
- 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:
the catBaseMerchandisingAssociationReferencedCatalogEntries class
the BaseMerchandisingAssociation definition
Option Description CatalogCommonObjectDefinitions.lzx
- Locate the class definition of catBaseMerchandisingAssociationReferencedCatalogEntries by
searching for the following substring:
<class name="catBaseMerchandisingAssociationReferencedCatalogEntries"
. - 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>
- Save your changes. WebSphere Commerce Developer compiles the code to produce an updated ManagementCenter.swf file under the WCDE_installdir\workspace\LOBTools\WebContent directory.
CatalogCommonObjectDefinitions.def
- Locate the BaseMerchandisingAssociation definition by searching
for the following substring:
definitionName="BaseMerchandisingAssociation"
. - 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>
- Save your changes.