The OFBiz catalog manager is a powerful tool that provides various features like catalog and product management, promotion and price rules management.
In this tutorial we will learn how to setup a catalog and categories in OFBiz.
Before going further lets understand the basic terms.
Categories are a grouping of products to be presented to the user on an eCommerce storefront. A category can have other sub categories or products. A category can have a name, long description and an image. OFBiz supports a number of category types with each category type has its own business rules.
In this tutorial we will use a “Catalog” category type which represents a category with standard products.
Catalog – A catalog is a collection of products that are grouped in categories.
In this tutorial we will first setup a catalog with a browse root category and a promotion category at level 1. The browse root category will have two more sub-categories underneath it.
The hierarchy of the catalog and categories will look like
Catalog -> Browse Root Category -> Sub – Category 1 -> Products
| -> Sub – Category 2 -> Products
-> Promotion Category -> Products
We will not go beyond categories at this stage. The products are shown just for a complete understanding of the catalog, categories and products hierarchy. From the example it is evident that catalogs stays at the top level of the hierarchy and products at the bottom of the hierarchy. A catalog can essentially have as many categories as you would like. Similarly there can be sub-categories to the main categories.
Later in the tutorial we will give an overview of a side deep category widget and we will see how it helps to drill down across the categories.
Step by step guide
To create a catalog, go to the catalog administration main page (which is basically a main page of the catalog manager application) and click on the “Create New Catalog” link on this page.
In the Catalog form enter “Catalog Id”, “Catalog Name” and set “Use Quick Add” to “N”. Normally if a catalog Id is not entered, OFBiz will generate a unique sequence automatically.
As mentioned in the beginning of the tutorial that OFBiz supports a number of different category types. “Quick Add” is a special type of a category and it is basically used to add all the products to the cart at once. Use “Quick Add” field to “N” if you do not want to use the special quick add categories.
Now click on the Update button.
Wow, you have created your first catalog!
The new catalog will appear under the Browse Catalogs screen widget in the left bar of the screen.
We will now setup the categories under the HWM Catalog.
To create a category go back to the main page and click on “Create New Category” link on this page. On the edit category screen enter the following fields
- Category Id – If not entered then a unique sequence is auto generated by OFBiz.
- Category Name – Name of the category and is displayed on your eCommerce application.
- Category type – Select Catalog (as discussed above)
Click on Update button and this will create your first category.
Now lets add this category to the catalog as shown in the hierarchy section above. Select the type as “Browse Root” and enter the from date and click on “Add” button. This will add Browse Root category (Name of the category) to the HWM Catalog (Name of the catalog).
Browse Root is parent of all browse categories. You have one Browse Root and multiple browse sub-categories. The important thing about the Browse Root (Only) catalog category type is that this category is not shown to the customer on the eCommerce site. Only sub-categories are shown.
Similarly add two categories namely: HWM_HATS (Hats) and HWM_TOPS (Tops). Also set Primary Parent Category to Browse Root Category. This will signify that Browse Root category is the primary parent of both the categories but this will not setup the parent/child associations.
You need to explicitly set up the child categories (HWM_HATS and HWM_TOPS) to the parent category (HWM_BR_CAT) through Rollup tab as shown below.
Similarly you can set up the promotion category (not as a sub-category to the Browse Root, please refer the hierarchy diagram above). The only important point to remember is you have to select “Promotions (One)” catalog category type while adding this category to the catalog.
The side deep category is a very important widget present in the left navigation bar (Highlighted in red) and will show all the categories under the Browse Root category.
So far we have covered the basics of catalog manager. I hope you will enjoy this tutorial.
Just a brief note on the upcoming tutorial, we will go through following items
- Product Store and how easily you can configure your product store
- How to add catalog to the product store
- How to create products
- How to group the products in different categories