Displaying custom merchandising association types in the storefront

Once a new merchandising association type has been defined, it must be enabled before it will appear in the storefront.

Before you begin

Ensure your custom merchandising association type has been created.

About this task

To display your custom merchandising association type:

Procedure

  1. Open the product display JSP file for the store to which you want to add the new merchandising association type.
  2. In the section of the JSP file where you display your merchandising associations call the following methods:
    1. Call the setAssociationType method of the com.ibm.commerce.catalog.beans.ProductDataBean. For example, type the following code:
      productBean.setAssociationType("new_association_type_name");
      • Where new_association_type_name is the name of your new merchandising association type.
    2. Retrieve the association by calling the getProductAssociation method of the com.ibm.commerce.catalog.beans.ProductDataBean. For example, type the following code:
      productBean.getProductAssociations();
  3. Use the retrieved data to render the necessary images on the product display page.
  4. Save all changes and close the JSP file.