OFBiz Tutorial: Associating Product with Multiple Categories

HotWax SystemsPublished: Updated:

Building off of other OFBiz catalog manager tutorials that have been posted earlier, today we will look into how you can associate a product with multiple categories.  This will be broken down into two sections: adding a product into a category, and then updating the product category association.

Add Product to a Category

Let’s first talk about prerequisite for managing this part of the catalog:

The user must at least have the role of catalog manager.  There are other roles that they can have that encompass catalog management, but they must have the ability to go here and manage this content.

The data must be setup so that the product’s association type is modeled correctly in the system.  Basically what this is saying is that some association types, while they may look like they would fit in here, will not have the product show up correctly on the front end if you do not do this properly.

Now that we know that – let’s discuss associating a product with a category.

Go to the “Catalog” component and click on the “Advanced Search” Button within “Search Products”.

ofbiz-tutorial-cross-sell-1

Fill in the search values on the “Find” screen and click on the “Find” button.

Ofbiz Tutorial Cross Sell 2

A list of products will be displayed based on the search criterion.

Ofbiz Tutorial Cross Sell 3

Click on any of the products and the “Edit Product” page of the selected product will get displayed.

Ofbiz Tutorial Cross Sell 4

Click on the “Categories” tab.

categories-tab

Fill in the following details in the “Add Category for this Product” form :
category-look-up

  1. Category
    • Select “Category” from look up which contains following information :
      • Product category Type Id
      • Primary Parent Category Id
      • Category Name
      • Description
      • Show In Select
  2. From Date
  3. To Date
  4. Comments
  5. Sequence Number
  6. Quantity

category-fields

Click on the “Add” button after entering the information.

add-button

At this point the added “Category” will be displayed in “Categories” section with the following details:

  • Category
  • From Date
  • To Date
  • Comments
  • Sequence Number
  • Quantity

categories-section

Update Product Category Association

Now that you can add product to a category, let’s discuss how you can edit this information in OFBiz. The prerequisites are exactly the same as for adding product to a category except to edit it, you need to have the product associated with a category.

Here are the steps for updating the product category association:

Go to the “Catalog” component and click on the “Advanced Search” Button within “Search Products”.

ofbiz-tutorial-cross-sell-1

Fill in the search values on the “Find” screen and click on the “Find” button.

Ofbiz Tutorial Cross Sell 2

A list of the products will be displayed based on the search criterion.

Ofbiz Tutorial Cross Sell 3

Click on any of products and the “Edit Product” page of the selected product will get displayed.

Ofbiz Tutorial Cross Sell 4

Click on the “Categories” tab.
categories-tab

Following details will be displayed in “Categories” section of added category:

  • Category
  • From Date
  • To Date
  • Comments
  • Sequence Number
  • Quantity

categories-section

Update existing category details.

category-update

Click on the “Update” button to save the details.

ofbiz-tutorial-cross-sell-11a

Use the “Delete” button to delete the category association – if necessary.

delete-button

Now your updated category details will be displayed on the “Categories” section of “Category Members” page.

More OFBiz tutorials to come in the not too distant future – stay tuned!

Tim Ruppert is Chief Operating Officer at HotWax Media, an OFBiz service provider, as well as an OFBiz project committer and active community member. Tim will join other HotWax Media employees and advisers in periodically posting thoughts here related to OFBiz, eCommerce, ERP, and related topics.

HotWax Systems About HotWax Systems
HotWax Systems develops, implements and supports enterprise-class, open source, digital commerce solutions that drive innovation and empower ownership.