OFBiz Tutorial: Managing Cross Sell Products in OFBiz

HotWax SystemsPublished: Updated:

Building off of other OFBiz catalog manager tutorials that Pranay and Vikas built earlier this year, today I will be diving into how you can manage cross sell information in OFBiz.  We’ll break this up into two separate sections: Adding Cross Sell Products and Editing Cross Sell Products once they are added.

Add Cross Sell Product(s)


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 adding cross sell product associations to your products.

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 “Associations” tab.

Ofbiz Tutorial Cross Sell 5

Fill in the following details in the “Add Association” form :

    Product Id
    Product Id To
    Association Type Id (Select Association Type as ‘Complementary Or Cross Sell’)
    From Date
    Sequence Number
    Reason
    Instruction
    Quantity

Ofbiz Tutorial Cross Sell 6

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

ofbiz-tutorial-cross-sell-7a

Then you’ve got your association taken care of, and you will see it displayed on the “Associations from this Product to” section of your product management page:

Ofbiz Tutorial Cross Sell 8

If your front end supports it, you will see your cross sell items on the front end of your website in the “Recommended Products” section of your product detail or shopping cart pages.

Edit Cross Sell Product(s)

Now that you can add cross sell products to your product associations, let’s discuss how you can edit this information in OFBiz. The prerequisites are exactly the same as for adding cross sells into the system except to edit it, you need to already have created the cross sell product association :).

Here are the steps for editing cross sell product associations:

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 “Associations” tab.
Ofbiz Tutorial Cross Sell 5

On the “Associations” page, click on the “Edit” button next to the complementary product in the “Associations from this Product to” section.

Ofbiz Tutorial Cross Sell 9

Update the following details in “Add Association” form:

    Thru Date
    Sequence Number
    Reason
    Instruction
    Quantity

Ofbiz Tutorial Cross Sell 5

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

ofbiz-tutorial-cross-sell-11a

Use the “Delete” button to delete the associated cross sell product – if necessary.

Ofbiz Tutorial Cross Sell 12

Now you’ve got your association tuned (or deleted) depending on what you needed to do in your system.  The changes will be reflected on the “Associations from this Product to” section of Associations page and will also be reflected on your front end in the “Recommended Products” section of your product detail page or shopping cart pages.

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

Tim Ruppert is a 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 is the leading global service provider for Apache OFBiz application development, and creators of HotWax Commerce, the world’s leading open-source Unified Commerce Platform. In 2017, HotWax Systems expanded its portfolio to include a full set of consulting services and custom business solutions based on the Moqui Ecosystem of open source projects.

Comments 3

  1. Avatar for HotWax Systems

    Hi Tim,

    This document is really helpful, but instead of deleting the associations, we can also set the thruDate to expire the assiociations right?

    Thanks,
    Narayan Patil

    1. Avatar for HotWax Systems
  2. Avatar for HotWax Systems

Leave a Reply

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