OFBiz Tutorial: Setup an OFBiz E-commerce Store Catalog

OFBiz e-commerce store catalog setup

OFBiz Tutorial: Setup an OFBiz E-Commerce Store Catalog. A well-structured catalog not only helps to manage merchandise display, but also makes it easy for the merchandising manager to use the back-end functionality efficiently. HotWax Systems walks you through the process of E-Commerce Store Catalog Setup in Apache OFBiz.

OFBiz and the E-Commerce Store Catalog

Effective visual merchandising is central to the success of an e-commerce store. Not only does displaying appealing images of merchandise help customers find products easily, but it can also influence customers to spend more, and to visit a site more frequently. The power and flexibility of Apache OFBiz are evident in the customizability of catalog setup options. OFBiz supports user efforts to define a product catalog with a category hierarchy. (For more about the importance of good visual merchandising, you can check out this blog post from HotWax Systems CEO Mike Bates here.)

Product Categories

Essentially, e-commerce store catalog setup in OFBiz is all about designating the appropriate product categories. Let’s take a look at key product categories, and how to utilize them effectively.

Here is the OFBiz catalog structure(Category hierarchy):

catalog diagram

Note – Sample XML data used in this post can be customized to fit your needs.

Next, let’s take a look at how to setup purpose-driven catalog data in OFBiz, focusing specifically on the purpose, description, and type of each category, along with sample data to illustrate each.

Browse Root Category

Purpose:  The Browse Root category of a catalog serves as the container category for the category tree (i.e. all sub categories ) of type CATALOG_CATEGORY.
Description: Only one Browse Root category can be associated with a catalog as a ProdCatalogCategoryType- PCCT_BROWSE_ROOT. The Browse Root category and the  categories associated with it will have the product category type CATALOG_CATEGORY.

Sample Data:

<ProdCatalog prodCatalogId="DemoCatalog" catalogName="Demo Catalog"/>
<ProductStoreCatalog productStoreId="9000" prodCatalogId="DemoCatalog" fromDate="2001-05-13 12:00:00.0" sequenceNum="1"/>
<ProductCategory productCategoryId="CATALOG1" productCategoryTypeId="CATALOG_CATEGORY" categoryName="Demo Browse Root Category"longDescription="Demo Catalog Primary Browse Root Category"/>

<ProdCatalogCategory prodCatalogId="DemoCatalog" productCategoryId="CATALOG1" fromDate="2001-05-13 12:00:00.0" sequenceNum="1" prodCatalogCategoryTypeId="PCCT_BROWSE_ROOT"/>
<ProductCategory productCategoryId="100" productCategoryTypeId="CATALOG_CATEGORY" primaryParentCategoryId="CATALOG1" categoryName="Gizmos" description="Description of Gizmos" longDescription="long description of Gizmos"><ProductCategory productCategoryId="200" productCategoryTypeId="CATALOG_CATEGORY" primaryParentCategoryId="CATALOG1" categoryName="Widgets" description="Description of Widgets" longDescription="long description of Widgets"/>
<ProductCategoryRollup productCategoryId="100" parentProductCategoryId="BROWSE_ROOT" fromDate="2001-05-15 12:00:00.0" sequenceNum="1"/>

<ProductCategoryRollup productCategoryId="200" parentProductCategoryId="BROWSE_ROOT" fromDate="2001-05-15 12:00:00.0" sequenceNum="2"/>
Additional Notes
  1. The Sequence Number in the ProductCategoryRollup shows the order in which the categories will be displayed on the storefront.
  2. A ProductCategory is either a group of products or sub-categories.
  3. A ProductCategory should be setup to group categories or to group products, but not to group categories and products simultaneously.
Search Category

Purpose: The Search Category supports the search product functionality for the online catalog. The ProdCatalogCategoryType for the Search Category is PCCT_SEARCH, and only a single category of this type can exist for a catalog. (This category will not be associated with the Browse Root Category.)
Description: The Search Category with ProdCatalogCategoryType as PCCT_SEARCH is considered to be a default search category. To search directly for a product or for any other categories, we need to associate those categories or products with the Search Category. If we want to enable the search to show the product variants, then we need to set the flag prodSearchExcludeVariants to ‘N’ on ProductStore. Note that only virtual products will be associated (in case of virtual/variant product) with the search category and to enable search on variants of virtual products, we will use the above-mentioned flag for the ProductStore.

Sample Data:

<ProductCategory productCategoryId="CATALOG1_SEARCH" productCategoryTypeId="SEARCH_CATEGORY" categoryName="Demo Default Search" longDescription="Catalog1 Search Products - only products in this category will show up in a search in catalog1" />
<ProdCatalogCategory prodCatalogId="DemoCatalog" productCategoryId="CATALOG_SEARCH" fromDate="2001-05-13 12:00:00.0" prodCatalogCategoryTypeId="PCCT_SEARCH"/>
<ProductCategoryMember productCategoryId="CATALOG1_SEARCH" productId="SV-1000" fromDate="2008-12-02 12:00:00.0"/>
<ProductCategoryMember productCategoryId="CATALOG1_SEARCH" productId="SV-1001" fromDate="2011-08-02 12:00:00.0"/>
<ProductCategoryMember productCategoryId="CATALOG1_SEARCH" productId="GZ-1000" fromDate="2001-05-13 12:00:00.0"/>

<ProductCategoryMember productCategoryId="CATALOG1_SEARCH" productId="GZ-1001" fromDate="2001-05-13 12:00:00.0"/>

Additional Notes

  1. The sequence number in Product Category Member shows the order in which the products will be displayed on the e-commerce store.
  2. Best practice: Set the Product Category Members.
View Allow Category

Purpose: The View Allow category is optional, and is a special purpose category. If  the View Allow Category exists for a catalog, then in order for products to be visible on the storefront, they must be associated with this category.
Description: One major benefit of using the View Allow Category is that you only need to maintain one relationship (i.e; associate the categories) directly with the View Allow Category for web visibility, rather than associating every product to it separately. The prod catalog category type will be PCCT_VIEW_ALLOW for this category.  It has no association with Browse Root.

Sample Data:

<ProductCategory productCategoryId="VIEW_ALLOW" productCategoryTypeId="CATALOG_CATEGORY" categoryName="View Allow"/>
<ProdCatalogCategory prodCatalogId="DemoCatalog" productCategoryId="VIEW_ALLOW" fromDate="2001-05-15 12:00:00.0" sequenceNum="1" prodCatalogCategoryTypeId="PCCT_VIEW_ALLOW"/>
<ProductCategoryMember productCategoryId="VIEW_ALLOW" productId="9000" fromDate="2001-05-13 12:00:00.0" sequenceNum="1"/>
<ProductCategoryMember productCategoryId="VIEW_ALLOW" productId="9001" fromDate="2001-05-13 12:00:00.0" sequenceNum="2"/>
Purchase Allow Category

Purpose: The Purchase Allow category is also an optional and special purpose category. You can implement generic purchasability rules by setting up this category. If this category exists, then only the products associated to the Purchase Allow Category will be available for purchase from the storefront.
Description: There might be some products visible to customers which cannot be purchased directly because they are sold together as part of a kit or a package purchase. These types of products are excluded from this category. The prod catalog category type for Purchase Allow Category will be PCCT_PURCHASE_ALLOW.

Sample Data:

<ProductCategory productCategoryId="PURCHASE_ALLOW" productCategoryTypeId="CATALOG_CATEGORY" categoryName="Purchase Allow"/>
<ProdCatalogCategory prodCatalogId="DemoCatalog" productCategoryId="PURCHASE_ALLOW" fromDate="2001-05-15 12:00:00.0" sequenceNum="1" prodCatalogCategoryTypeId="PCCT_PURCHASE_ALLOW"/>
<ProductCategoryMember productCategoryId="PURCHASE_ALLOW" productId="9000" fromDate="2001-05-13 12:00:00.0" sequenceNum="1"/>
<ProductCategoryMember productCategoryId="PURCHASE_ALLOW" productId="9001" fromDate="2001-05-13 12:00:00.0" sequenceNum="2"/>
Tax Category

Purpose: The Tax Category is responsible for applying and calculating tax for all the products belonging to it. (The Tax Category need not be associated with the Browse Root Category.)
Description: The Tax Category can be treated as a grouping of products, and the same tax percentage rate applied to all. The advantage of this type of categorization for applying tax is that it prevents the application of multiple taxes/tax percent rates on single items. Various Tax Categories can be created for a number of product groups if the tax percent applied is different for various product groups. For instance, if you have to setup a tax percent for food products at 3.0% and, and a tax percentage for water products sold within the state of Utah at  5.0%, you will need to setup two categories for it- “FOOD_TAX_CATEGORY” and “WATER_TAX_CATEGORY”. After adding the products to the categories, the categories need to be associated with the tax authority, and two different tax rates (3.0% and 5.0%) will be set for them. Then, when a user purchases a product from the storefront, the tax will be calculated based on the tax rate of the category to which product belongs.
Category Type: TAX_CATEGORY

Sample Data:

<ProductCategory productCategoryId="FOOD_TAX_CATEGORY" categoryName="Tax Food Products" productCategoryTypeId="TAX_CATEGORY"/>
<ProductCategory productCategoryId="WATER_TAX_CATEGORY" categoryName="Tax Water Products" productCategoryTypeId="TAX_CATEGORY"/><Party partyId="UT_TAXMAN" partyTypeId="PARTY_GROUP"/>
<PartyRole partyId="UT_TAXMAN" roleTypeId="TAX_AUTHORITY"/>
<PartyGroup partyId="UT_TAXMAN" groupName="Utah Sales Tax Authority"/>
<TaxAuthority taxAuthGeoId="UT" taxAuthPartyId="UT_TAXMAN" includeTaxInPrice="N"/>

<!--Tax rate for food category products-->
<TaxAuthorityCategory taxAuthGeoId="UT" taxAuthPartyId="UT_TAXMAN" productCategoryId="FOOD_TAX_CATEGORY"/>
<TaxAuthorityRateProduct taxAuthorityRateSeqId="9002" taxAuthGeoId="UT" taxAuthPartyId="UT_TAXMAN" taxAuthorityRateTypeId="SALES_TAX" productStoreId="9000"
productCategoryId="FOOD_TAX_CATEGORY" titleTransferEnumId="" minItemPrice="0.00" minPurchase="0.00" taxShipping="N" taxPercentage="3.00" taxPromotions="N" fromDate="2001-05-13 00:00:00.001" thruDate="" description="Tax Applicable for Food Category Products"/>

<!--Tax rate for water category products-->
<TaxAuthorityCategory taxAuthGeoId="UT" taxAuthPartyId="UT_TAXMAN" productCategoryId="WATER_TAX_CATEGORY"/>
<TaxAuthorityRateProduct taxAuthorityRateSeqId="9003" taxAuthGeoId="UT" taxAuthPartyId="UT_TAXMAN" taxAuthorityRateTypeId="SALES_TAX" productStoreId="9000"
productCategoryId="WATER_TAX_CATEGORY" titleTransferEnumId="" minItemPrice="0.00" minPurchase="0.00" taxShipping="N" taxPercentage="5.00" taxPromotions="N"
fromDate="2001-05-13 00:00:00.001" thruDate="" description="Tax Applicable for Water Category Products"/>
Promotions Category

Purpose: The Promotions Category is  special purpose category that promotes  specific type of product in a specific section throughout the site to attract users. For a catalog, the single promotion category will exist having prod catalog category type as PCCT_PROMOTIONS.
Description: The Promotions Category categorizes all the promoted products (scattered throughout the various categories of the online store) into a single category on the e-commerce site. The Promotions Category usually has a products association, but it can also display the categories which a merchandizing manager wants to promote. It is not mandatory to associate the Promotions Category with the Browse Root category, despite the fact that its product category type is CATALOG_CATEGORY.

Sample Data:

<ProductCategory productCategoryId="PROMOTIONS" productCategoryTypeId="CATALOG_CATEGORY" categoryName="Special Offer"/>
<ProdCatalogCategory prodCatalogId="DemoCatalog" productCategoryId="PROMOTIONS" fromDate="2001-05-13 12:00:00.0" sequenceNum="1" prodCatalogCategoryTypeId="PCCT_PROMOTIONS"/><ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="PROMOTIONS" productCategoryId="4999" sequenceNum="1"/>
<ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="PROMOTIONS" productCategoryId="5004" sequenceNum="2"/>
<ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="PROMOTIONS" productCategoryId="5005" sequenceNum="3"/>
<ProductCategoryMember productCategoryId="PROMOTIONS" productId="9021" fromDate="2001-05-13 12:00:00.0" sequenceNum="1"/>
<ProductCategoryMember productCategoryId="PROMOTIONS" productId="9000" fromDate="2001-05-13 12:00:00.0" sequenceNum="2"/>

Additional Notes

  1. The sequence number in the Product Category Member and the Product Category Rollup shows the sequence in which the products and categories will be respectively displayed in the Promotions Category section.
  2. Best Practice: If the page will display the products, set the Product Category Members.
  3. Best Practice: Set Category Rollups if the page will show the categories.
Most Popular Category

Purpose: The purpose of this category is to list the most popular products available on the e-commerce site. The prod catalog category type for the Most Popular Category is PCCT_MOST_POPULAR,  and only one category of this type exists for a catalog.
Description: The Most Popular Category usually has a products association with it, but it can also contain a list of the most popular categories which will in turn display the most popular products within them.

Sample Data:

<ProductCategory productCategoryId="MOST_POPULAR" productCategoryTypeId="CATALOG_CATEGORY" categoryName="Most Popular"/>
<ProdCatalogCategory prodCatalogId="DemoCatalog" productCategoryId="MOST_POPULAR" fromDate="2001-05-15 12:00:00.0" sequenceNum="1" prodCatalogCategoryTypeId="PCCT_MOST_POPULAR"/><ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="MOST_POPULAR" productCategoryId="4999" sequenceNum="1"/>
<ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="MOST_POPULAR" productCategoryId="5004" sequenceNum="2"/>
<ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="MOST_POPULAR" productCategoryId="5005" sequenceNum="3"/>
<ProductCategoryMember productCategoryId="MOST_POPULAR" productId="9000" fromDate="2001-05-13 12:00:00.0" sequenceNum="1"/>
<ProductCategoryMember productCategoryId="MOST_POPULAR" productId="9001" fromDate="2001-05-13 12:00:00.0" sequenceNum="2"/>

Additional Notes

  1. The Most Popular Category displays products based on the number of hits on the product or based on the sale of a product.
  2. To display the most popular categories or products, an algorithm is written which displays the products sorted by sale or hit.
  3. This method is not used in OFBiz, instead a catalog category type PCCT_MOST_POPULAR is used which give the rights to merchandizing manager to display the products in this category which are chosen keeping in mind the growth of business.
  4. The sequence number in the ProductCategoryRollup and ProductCategoryMember shows the sequence in which the categories and products will be displayed.
  5. Best Practice: Set the ProductCategoryMembers if products will be displayed on the page.
  6. Best Practice: Set ProductCategoryRollups if categories will be displayed on the page.
What’s New Category

Purpose: All the new arrivals in a e-commerce site are displayed under  the What’s New Category. The prod catalog category type for this category is PCCT_WHATS_NEW. Only one category of this type exists for a catalog.
Description: This category has products associated that are newly added to the catalog.

Sample Data:
<ProductCategory productCategoryId="WHATS_NEW" productCategoryTypeId="CATALOG_CATEGORY" categoryName="Whats New"/>
<ProdCatalogCategory prodCatalogId="DemoCatalog" productCategoryId="WHATS_NEW" fromDate="2001-05-15 12:00:00.0" sequenceNum="1" prodCatalogCategoryTypeId="PCCT_WHATS_NEW"/>
<ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="WHATS_NEW" productCategoryId="4999" sequenceNum="1"/>
<ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="WHATS_NEW" productCategoryId="5004" sequenceNum="2"/>
<ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="WHATS_NEW" productCategoryId="5005" sequenceNum="3"/>
<ProductCategoryMember productCategoryId="WHATS_NEW" productId="9000" fromDate="2001-05-13 12:00:00.0" sequenceNum="1"/>
<ProductCategoryMember productCategoryId="WHATS_NEW" productId="9001" fromDate="2001-05-13 12:00:00.0" sequenceNum="2"/>
Additional Notes
  1. The visibility of a product will depend on the introduction date of that product (i.e; an algorithm could be applied to display the last 20 products added to the storefront based on their introduction dates).
  2. Algorithms are applied to the What’s New Category that then determine which product will be displayed in the category. The products to be displayed in the category are sorted on the basis of the introduction date.
  3. In OFBiz, instead of applying an algorithm to determine which products will be displayed in the category, the merchandising manager is empowered to make these decision and manage the products.
  4. The sequence numbers in the ProductCategoryRollup and the ProductCategoryMember show the order in which the categories and products will be displayed on the storefront.
  5. Best Practice: Set the ProductCategoryMembers if products will be displayed on the page.
  6. Best Practice: Set ProductCategoryRollups if categories will be displayed on the page.

For more about data setup, please refer to our Data Setup Best Practices post  (Specifically, learn more about how to setup XML data with the correct reader choice.)

To learn more about how to leverage the power and flexibility of OFBiz or HotWax Commerce to benefit your business, contact us today for a free consultation!

DATE: Apr 7, 2015
AUTHOR: Pranay Pandey
OFBiz, OFBiz Tutorials

Leave a Reply

Your email address will not be published. Required fields are marked *