Access to add and change pages is restricted. See: https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

OFBiz Basic Production Setup Guide

With an Emphasis on eCommerce

Written by: David E. Jones With feedback and contributions from Ruth Hoffman, Andy Zeneski, Si Chen, Chris Chesney, Hans Bakker, and Al Byers

Sponsored by:
Integral Business Solutions (http://www.go-integral.com)
Undersun Consulting LLC (http://www.undersunconsulting.com)

Table of Contents

  1. Purpose and Goal of This Document
  2. Data To Gather for Setup
  3. General Terms and Information
    1. OFBiz "Manager" Applications
    2. Other OFBiz Terms
  4. Technical Setup Process
    1. Tools Installation
    2. OFBiz Installation
    3. Database Setup
    4. Seed Data Loading
    5. OFBiz Configuration
      1. Cache Settings
      2. Debug Settings
      3. Security Settings
      4. URL and Port Settings
      5. Ports, Default Values
      6. SSL Certificate Setup
      7. Currency, Locale Settings
      8. Email Server Settings
      9. Mounting a Root WebApp
    6. Running OFBiz
    7. Performance Monitoring and Tuning
  5. Business Setup Process
    1. General Company Setup
      1. Company Contact Information
    2. Facility (Warehouse) Setup
    3. WebSite Setup
    4. Store Setup
      1. Store Settings
      2. Store Role Settings
      3. Promotional Settings
      4. Catalog Settings
      5. Web Site Settings
      6. Sales Tax Settings
      7. Store Shipping Settings
        1. UPS Online Rate Estimates
        2. UPS XPCI Integration
        3. USPS Online Rate Estimates
      8. Store Payment Settings
        1. Payment Processor Details
        2. PayPal Payment Setup
        3. CyberSource Payment Setup
      9. e-mail Settings
      10. Survey Settings
      11. General Settings Override
    5. Catalog, Category, Product Setup
      1. Catalog Setup
      2. Category Setup
      3. Product Setup
        1. Add Content to the New Product
        2. Add Prices to the Product
  6. POS Setup Process

Purpose and Goal of This Document

In addition to being an excellent development framework and platform for enterprise information automation, OFBiz also features many great applications that can be used out of the box without a lot of customization. However, since it is enterprise class software, there are a lot of configuration options, settings, and data structures that require some level of familiarity.

The purpose of this document is to help you get OFBiz setup for production use, with an emphasis on eCommerce deployments. This is not meant to be a complete discussion of issues or decisions to make or options to configure, just an overview of the basic settings that need to be configured for a production instance of OFBiz.

For more detailed information on this topic see the "Configuration, Deployment, and Maintenance" document on the OFBiz Documentation Site from Undersun Consulting. For more detailed coverage of development topics we recommend the OFBiz Training Videos and Reference Materials from Undersun Consulting.

This document is meant to be a series of instructions to be followed in order, except where a part of the document says otherwise (there are very few). Of course, if you feel comfortable with the topics discussed here you can use it as a reference and not follow it as a list of instructions.

NOTE: We recommend that you read this entire document before starting the process or making any changes. While you are reading it is helpful to look at the files and web pages in question so you can visualize better where things go and what they look like. Naturally you can ignore this, but a half hour studying this document could save you a lot of time late
 
Note on Typographic Conventions Used in This Document

Text enclosed in a square box such as [[ ]] represents an OFBiz application browser tab selection.

Throughout the document the author has provided expert advice or other observations. These notations are indicated as follows:

Expert Recommendations: Here is some text you better pay attention to!

A notation used throughout this document to indicate the starting directory (or root) location for the OFBiz installation is \${ofbiz install dir}. This is typically followed by the path name location of the file or directory being discussed.

Where OFBiz application manager web tools have individual page name or table name titles, the page names and titles are highlighted with a background color: This Is A Page

Data To Gather for Setup

1. Technical Info
ß Host/domain name to deploy on (and ports if not 80, 443)
ß Web server setup: direct to Tomcat/Jetty, through Apache, using another (stand-alone) application server?
ß Which database to use. Is the database installed on a remote server or installed locally ?
2. Company Party (Party Manager -> Find -> Profile; partyId: Company)
ß Name
ß Customer Service
1. Telephone Number
2. Email Address
3. Correspondence Postal Address
3. Warehouse Facilities (Facility Manager -> Facilities -> Facility)
ß Title for each (ie Web Store Warehouse, or California Warehouse, or Burbank Distribution Center)
ß Telephone Number
ß Shipping & Receiving Postal Addresses (with names)
4. Email Settings (general.properties)
ß SMTP Server (relay host)
ß SMTP Username (if needed)
ß SMTP Password (if needed)

General Terms and Information

OFBiz "Manager" Applications

OFBiz provides a number of Manager applications, which make up the "back office" functions of the suite. These applications are not intended to be customer or public facing, but rather tools to be used to administer and manage the OFBiz software. Manager applications are, by default, accessible using standard URL addressing and built-in OFBiz security services.

Manager applications which will be referenced in this document include the:
"Catalog Manager" accessed at:
http://localhost:8080/catalog/control/main
"Party Manager" accessed at:
http://localhost:8080/partymgr/control/main

More technical web based tools, or tools for the OFBiz framework are available in the "Web Tools" application: http://localhost:8080/webtools/control/main

Note: OFBiz will automatically make adjustments between non-secure and secure pages based on login requirements. Therefore, you can use the http (non-secure) notation to access the above mentioned manager applications when first attempting to access them.

Once you are logged in to any of the OFBiz Manager Applications, tabs across the top will be in place to allow you to easily switch from one application to another, or to open them in a separate window or browser tab.

Other OFBiz Terms

In OFBiz a "Party" refers to a single entity such as a human being or a company or a family or even a group of friends. In other words, it can represent an individual (a Person) or a group of parties, including individuals and other groups (a Party Group).

The "Entity Engine" refers to the embedded OFBiz database access engine. Likewise there are other "engines" in OFBiz including the Service Engine which is another critical tool that is the foundation of the service oriented architecture for logic and processes in OFBiz.

Technical Setup Process

Tools Installation

1. Check/install Java SDK (need 1.4 series full SDK, not just JRE)
2. Check/install SVN client

Expert Recommendation: If you intend to only install a binary release version of OFBiz you will not need the SVN client.

3. Check/install ant (1.6 or later)

OFBiz Installation

1) If you intend to use a development version of OFBiz, follow the instructions at http://svn.ofbiz.org to checkout the latest code or your desired stable tag

2) Build using "ant" in the ofbiz home directory (the directory where you installed OFBiz)

Database Setup

By default OFBiz includes and is configured for an embedded Java database called Derby. This database used to be called Cloudscape but was purchased by IBM, changed to be DB2 specification compliant, and then release as open source. This is a great database for demonstration, testing, development, and even small-scale production environments.

Expert Recommendation: We generally do not recommend the Derby database for production because it is not as easy to administer and optimize and will generally not perform as well as more substantial or native databases as Derby is a lighter weight Java database.

Expert Recommendation: There are many databases that OFBiz can use, both commercial and open source. We generally recommend using an open source database such as Postgres, MaxDB by MySQL, or some of more recent version of the MySQL database. The database to use is an important decision and may affect many things down the road. If you do not have a preferred database to use, we recommend discussing options with an experienced consultant before making a final decision.

1. If you decide not to use the embedded Derby database, check/install your database of choice

2. If necessary, put the correct JDBC driver in:

${ofbiz install dir}/framework/entity/lib/jdbc

replacing the old or incorrect version of the driver there (ie copy in with same name to avoid problems with update restoring the old driver later)

3. To setup the Entity Engine to use a different database from the default Derby database.

In the: ${ofbiz install dir}/framework/entity/config/entityengine.xml file:

Modify an existing datasource (near the bottom of the file) or create a new one by copying one of the sample datasources already there and giving it a new unique name
ß If using the default OFBiz transaction manager and connection pool, update the data URI, username and password in the inline-jdbc tag
ß If you want your OFBiz tables in a special schema first create that schema in your database, then set the schema-name attribute on the datasource tag
ß Find the "default" delegator near the top of the file and change the datasource-name attribute value in the group-map tag under it to the name of the data source you modified or created.

Expert Recommendation: if you are using an external app server or want to setup more advanced Entity Engine configurations, see the Entity Engine Configuration Guide or other online documentation. The training videos from Undersun Consulting are highly recommend if you get into more advanced usage of OFBiz.

Seed Data Loading

To load the seed data just use the OFBiz install routine through ant or directly with Java and the ofbiz.jar executable JAR file. By default the install routine will load the "seed" and "demo" sets of data files, as defined in the entityengine.xml file and in the ofbiz-component.xml file in each component. Run one of these two options from the command line in the ofbiz home directory to run the default install routine:

"ant run-install" or
"java -jar ofbiz.jar -install"

Note that you can choose to only load the basic "seed" data and not load the "demo" set of data files. To do this run something like:

"java -jar ofbiz.jar -install -readers=seed"

Expert Recommendation: For smaller installations we recommend loading the demo data and modifying it rather than creating all of the data from scratch.

For larger installations we recommend creating seed data files with your own settings, copied from the demo seed data, or simply creating all data from scratch. These can be added to the "ext" set of install data files, which is done by referencing those files in an ofbiz-component.xml file entity-resource tag with the attribute reader-name="ext". To load the "seed" and "ext" groups run something like:

"java -jar ofbiz.jar -install -readers=seed,ext"

The seed data includes a Party with ID "admin" and it has a number of UserLogin accounts associated with it that have varying permissions. Note the following configuration changes:

1. For production systems the passwords on all UserLogin accounts associated with the "admin" party should be changed from their default values.

2. The default password for the "admin" userLoginId is "ofbiz", as it is for the "flexadmin" and "demoadmin" accounts.

The "1" account is meant to be used with the POS system so the new password should include only numbers to make it easier to use with the POS client.

Expert Recommendation:While the "admin" party is the most critical to make sure the passwords are changed for, there are other parties you should check, and change the password for all User Login accounts associated with these parties. This includes "ltdadmin" and "externaluser" and if the demo data is loaded (done by default) then also the users "DemoBuyer", "DemoRepAll", and "DemoRepStore".

OFBiz Configuration

Cache Settings

${ofbiz insall dir}/base/config/cache.properties

Fresh from SVN, this file is configured to be development friendly to reload resources frequently. For production use the expire times for the caches in the last section of the file should all be commented out by putting a pound sign "#" at the beginning of each line. The properties in question start with "minilang.", "script.", "webapp.", "widget." And "template.".

Debug Settings

${ofbiz install dir}/base/config/debug.properties

This file is used to enable/disable different logging levels and used to configure Log4J logging level and output settings. For most production use it can stay as-is. Disabling the "info" and "timing" level properties can save some resources on the server, but we recommend leaving all of the others enabled. To do this just change the values of the "print.info" and "print.timing" properties to anything except "true".

Security Settings

${ofbiz install dir}/framework/security/config/security.properties

There are various settings you might want to configure in this file, but for most production use it can remain unchanged.

URL and Port Settings

The following configuration files contain port configuration that may configured for custom OFBiz installations:

${ofbiz install dir}/base/config/ofbiz-containers.xml (The Containers Configuration File)

ß Sometimes other container configuration files are used, but are generally in that same directory and will be specified in the start properties file used (see start.properties, pos.properties, install.properties, etc)
ß The integration with Shark in OFBiz is still not complete, so we recommend disabling Shark. So, the Shark container configuration near the beginning of the file should be commented out.
ß The BSH client (the last container in the file) should generally be disabled or at least protected by a firewall for production deployments. Otherwise this is a significant security risk.
ß Note that if an external application server is used instead of the embedded Tomcat or Jetty servers then many things normally configured here will be configured in the setup files for the external application server.

${ofbiz install dir}/framework/webapp/config/url.properties (The URL Properties File)

ß These properties are used to configure the settings to send to the client browser. The port and host settings may be different than the port and host settings of the local machine if it is running through Apache through AJP, through any proxy, or through a load balancer of any sort. The settings in this file should be set to what the client browser will see when communicating with your system.
ß Note that the settings in this file can be overridden on the WebSite record with the ID specified by the webSiteId field in the web.xml file in each webapp, if applicable. These can be viewed and modified in the WebSites tab of the Content Manager application.

${ofbiz install dir}/base/config/jndiservers.xml (JNDI Servers XML File)

ß Generally only the "default" server is used which has automatic configuration through the Java standard JNDI facility, so no changes are needed for most production deployments in this file.

${ofbiz install dir}/base/config/jndi.properties (JNDI Properties file)

ß This is a standard Java JNDI configuration properties file and is used to configure the local JNDI server to be used. Note that this is how the "default" JNDI server in the JNDI Servers XML File is configured. If this file is not present the Java standard JNDI classes will use various defaults instead.

${ofbiz install dir}/framework/service/config/serviceengine.xml (Service Engine XML file)

ß Most of the settings in this file can remain unchanged for production deployments, but there are some default server locations that refer to port 1099 (JRMP, for RMI) and 8080 (HTTP). These are in the "service-location" tags in the file.

${ofbiz install dir}/framework/jotm/config/iiop.properties (or jrmp.properties) (Carol IIOP or JRMP Only Properities)

ß The default transaction manager in OFBiz is called JOTM and it includes a remote communication container called Carol that implements various standard protocols.
ß There are two configuration files here as examples of two different ways of configuring Carol in JOTM. The iiop.properties file sets up the IIOP and the JRMP protocols, while the jrmp.properties file only sets up the JRMP protocols. The properties file to use for Carol in JOTM is specified in the ofbiz-containers.xml file, or whichever containers XML file you are using, in the "jndi-config" property of the "jotm-container" container.
ß The only part of OFBiz that uses the IIOP protocol is that Shark workflow engine. The integration with Shark in OFBiz is still not complete, so we recommend disabling Shark and turning off IIOP. To do this change the jndi-config property in the jotm-container container in the ofbiz-containers.xml (or other containers XML) file from iiop.properties to jrmp.properties.

Ports, Default Values

ß HTTP - 8080
o Configured in: Containers XML File
o Referenced in: Service Engine XML File, Client Browser (if running direct), URL Properties File
ß HTTPS - 8443
o Configured in: Containers XML File
o Referenced in: Client Browser (if running direct)
ß AJP13 - 8009
o Configured in: Containers XML File
o Referenced in: Apache mod_jk plugin configuration
ß JRMP (JNDI, RMI, etc) - 1099
o Configured in: Carol Properties (carol.jrmp.url)
o Referenced in: Containers XML File, JNDI Properties File, Service Engine XML File
ß IIOP (Shark, etc) - 2000
o Configured in: Carol Properties (carol.iiop.url)
o Referenced in: Containers XML File
ß BSH Client - 9989, 9990 (this should generally be disabled or at least protected by a firewall)
o Configured in: Containers XML File

SSL Certificate Setup

Choose a password to enter later when prompted. This same password will be used for the keystore password and for another question a bit later as the key password for.

1. Run: "keytool -genkey -keyalg RSA -alias ssl -keystore [keystore name]"
Go through and answer the following questions:
Enter keystore password: [password]

What is your first and last name?
[Unknown]: www.mydomain.com (example)

What is the name of your organizational unit?
[Unknown]: Undersun Testing (example)

What is the name of your organization?
[Unknown]: Undersun Testing (example)

What is the name of your City or Locality?
[Unknown]: New York (example)

What is the name of your State or Province?
[Unknown]: New York (example)

What is the two-letter country code for this unit?
[Unknown]: US (example)

Is CN=www.mydomain.com, OU=Undersun Testing, O=Undersun Testing, L=New York, ST=New York, C=US correct?
[no]: yes

Enter key password for
(RETURN if same as keystore password): [password]

2. Run: "keytool -certreq -alias ssl -keyalg RSA -file certreq.csr -keystore [keystore name]"

The following will be prompted/shown:
Enter keystore password: [password]

The CSR will be saved in the current directory: ----BEGIN NEW CERTIFICATE REQUEST--- and ---END NEW CERTIFICATE REQUEST----

3. Submit the CSR to a signing authority (Thawte, Verisign, etc)

4. Download your certificate from the signing authority. Please remember to download the Certificate in PKCS#7 format

5. Import the Certificate into the keystore by running:
"keytool -import -alias ssl -trustcacerts -file mysignedcert.cer -keystore [keystore name]"

6. Configure the ofbiz-containers.xml file to point to your new keystore and password:
ß If using Tomcat (Catalina), which is the default, find the "catalina-container" -> "https-connector" -> "keystore" and "password" properties and set them.
ß If using Jetty find the "jetty-container" -> "https-listener" -> "keystore" and "password" properties and set them.
ß For other Servlet containers, see the documentation for that container to find out how to set the HTTPS keystore and password settings.

Currency, Locale Settings

Currency settings may be configured in the following configuration file:

${ofbiz install dir}/framework/common/config/general.properties

ß Default Currency Code (must exist in Uom table, three letter code, see seed data in the CurrencyData.xml file): currency.uom.id.default=USD
ß Default Country Code (must exist in Geo table, is three letter ISO country code, see seed data in the GeoData.xml file): country.geo.id.default=USA
ß Note that these settings can be overridden for a Store in the Edit Product Store page.

Email Server Settings

e-mail settings may be configured in the following, OFBiz file:

${ofbiz install dir}/framework/common/config/general.properties

ß SMTP Server (relay host): mail.smtp.relay.host
ß SMTP Username (if needed): mail.smtp.auth.user
ß SMTP Password (if needed): mail.smtp.auth.password
ß Turn on email notifications by setting the mail.notifications.enabled property to "Y".

Mounting a Root WebApp

It is often desirable to have one of the webapps mounted on the root. This is often either the ecommerce webapp or your own web site, which is created as a webapp in an OFBiz component would be setup the same way.
ß To set the mount point to root (or "/") for a webapp, find the corresponding "webapp" tag in the appropriate ofbiz-component.xml file and change the "mount-point" attribute on that tag to equal "/".
ß For the default OFBiz ecommerce webapp, this is found in the file:

${ofbiz install dir}/applications/ecommerce/ofbiz-component.xml

Running OFBiz

There are various ways to run OFBiz, and they all come down to some variation of the executing the "ofbiz.jar" executable JAR file. On the command line this can be as simple as:

"java -jar ofbiz.jar".

For production use you will want to setup a start script that contains special settings for things like memory heap size, and so on. There are example start and stop scripts in the root ofbiz directory in the startofbiz.sh and stopofbiz.sh files.

Expert Recommendation: Instead of running the startup and shutdown scripts manually it might be a good idea to set them up as services on the system, or use something like daemontools to make sure the process is restarted automatically if it goes down for some reason.

Performance Monitoring and Tuning

Expert Recommendation: While some steps can be taken at this point in the configuration process, the real performance testing and tuning should be done after you have setup your catalog, categories and products, and after you have customized any templates you plan to.

As mentioned above a critical part of performance tuning is turning off the expire times in the cache.properties by commenting out the lines near the bottom of that file that set those values.

General Cache Information
ß You can get a lot of good information on database and configuration file (XML, properties, etc) performance by looking at the statistics in the cache management page in Web Tools. They are all listed there with statistics about hits and misses, and about why cache misses happened.

ß There are three causes for cache misses:
1. Not Found
2. Soft Reference clearing (is done during garbage collection)
3. Expire Time reached for an entry in the cache
ß Memory Settings

If you are running into problems with Soft References (as seen on the cache management page in WebTools), the case is generally that your heap memory settings are less than ideal. Every time Java does a memory allocation and finds it needs to grow the heap size it first does a garbage collection and clears out soft references. The Entity Engine caches all use Soft References to avoid overrunning memory with cached database data.

In other words, you may have 2Gb of memory on the box, but you are probably only starting with 64Mb (or even less) and have a max heap of 128Mb. These are done with the following java command line arguments: -Xms64M for the low size, and -Xmx128M for the max size. We usually recommend a max heap size of around 75% of the memory on the box, but that depends on the operating system of course... The small size should be pretty high, perhaps even as high as the max, to avoid the caches being cannibalized during allocations and garbage collections as described above.

ß Database Intensive Operations
The comments above on memory settings, caches, etc. are for category browsing pages and such where just about everything should be cached. For db intensive operations, like the product searching, it's much better to focus on how the db is doing with the queries.

Business Setup Process

General Company Setup

There is a Party with the ID "Company" that is configured as the default Party that represents the company that owns or is running the system. You can have multiple organizations configured in the system, but this one is referred to be default in the Demo Product Store (which we will be modifying and not replacing in a minute).

Company Contact Information

In the Party Manager "Find" page type in "Company" in the Party ID field and press enter. This will bring up the View Profile page for the Party.

On this screen change the existing address which represents the "Billing (AP) Address", "Payment (AR) Address", and "General Correspondence Address". Note that if desired you can remove purpose(s) from this address and create other addresses for those purposes.

You should also setup any telephone numbers and email addresses you want for your Company.

Facility (Warehouse) Setup

There is a Facility with the ID "WebStoreWarehouse" that we will be modifying in this step. This is the default fulfillment facility for the Demo Store (which we will be modifying and not replacing soon). You can create other Facilities here, but for this basic setup we will keep the single warehouse configuration and modify this warehouse in place.

In the Facilities List in the Facility Manager click on the "Web Store Warehouse" link, and for that facility click on the "ContactMechs" tab/button.
There is already an address setup that is a Shipping Destination Address and a Shipping Origin Address. To setup your Facility's address just "Update" this address.
There is already a phone number setup that is a Shipping Destination Phone Number and a Shipping Origin Phone Number. To setup your Facility's phone number just "Update" this phone number.

There are various other things that can be setup here including more advanced options such as Facility Locations for inventory, and so on. This is also where you can go to manage picking/packing and shipping of orders, and the receiving of returns, purchase orders, and so on.

WebSite Setup

There is a WebSite already setup with the ID "WebStore". This ID is referred to in the webSiteId field of the web.xml file in the eCommerce webapp.

For this basic setup we will leave this as is. If you create a custom webapp for your ecommerce site, be sure to set the appropriate webSiteId in the web.xml file.

The WebSite record is used to configure which Product Store to use for the ecommerce site that references it. This WebSite is already configured to refer to the "OFBiz E-Commerce Store", which we will be modifying, so there is no need to change anything here.

Note that the settings in the url.properties file can be overridden for each WebSite, as can be seen on the Edit Web Site page in the Content Manager.

Store Setup

There is a demo eCommerce store already setup with most of the options we need, so instead of creating a new one we will use that one and just change it's name and other options. The ID, which is 9000, will stay the same.

To modify this store go to the Catalog Manager application and select the Stores top level tab. This will bring up a Product Store List. Select the store with ID 9000, which by default has the name "OFBiz E-Commerce Store".

As we setup the store we will cover each tab in order and discuss options on that page and related options in configuration files:

Store Settings

Change the Store Name to something more applicable. This is mostly for internally referring to your store and won't be shown to the customer.

Change the Company Name to something more applicable, as desired.
There are various settings that can be used to change the way things show up in the default OFBiz eCommerce templates. You can change these for options you prefer, or for most fields you can empty them to have nothing displayed there.
The Title and Subtitle show in the header.

The Style Sheet refers to a CSS style sheet to use for the colors, fonts, etc for the site.

The Header Logo, Header Middle Background, and Header Right Background specify images in the 3 main areas of the header. To show no images, or background images, leave these blank.

The Pay To Party Id field is already set to Company as it should be, and that is the Party we configured earlier. For multiple organizations or if you have another company Party setup the party ID can be specified here.

To remove the demo messages on the checkout screens and order emails change the Is Demo Store field from Y to N.

The Inventory Facility Id and the various inventory settings are already setup with good default, but you may review and change them as desired. Typically the only one you may want to change is the Require Inventory field. By default it is set to N, but changing it to Y will cause products to only be purchasable if they are in stock.

There are many other settings on the Store, most of which you won't want to touch. For more information on them see the Undersun documentation site or other such reference material

Store Role Settings

There are various reasons why you might want to associate a Party with a Store. The main one to consider is in order for a Party to take sales orders for a specific Store the Party must be associated with the Store in the "Sales Representative" role.

Promotional Settings

This is where you can associate promotions (setup in the Promos header tab) with the store, including effective dating, sequencing and so forth.

There are all example promotions and it is good to keep them in the database for future reference, but you can delete all of these store associations so they won't get in the way for this store. Just click on the "[Delete]" link for each one.

Catalog Settings

This tab shows all Product Catalogs associated with this Store. The demo data has two Catalogs associated by default, and you can remove both of them since we will be creating a new Catalog later. These two you can leave in the database as examples for future reference, but click on the "[Delete]" buttons here to remove the associations with the Store.

Web Site Settings

This tab shows all WebSites associated with this store, or that this store is associated with. You will see that the demo data already has this Store associated with the eCommerce Web Site, and the Order Entry Web Site.
Leave these defaults as they are.

If you have your own ecommerce webapp and have created a WebSite for it as described above, associate that WebSite with the store.

Sales Tax Settings

It is possible to use other tax calculation services or integrate with other tax calculation software, and there are others included with OFBiz, but the default one uses a simple OFBiz entity with records for different tax jurisdictions and effective dates.

The demo data includes one example that applies for any Country, State, and Tax Category, has no Minimum Purchase amount, and the tax rate is 10%. Note that the tax rate is entered as a decimal number and not a whole percentage number. In other words, 10% is entered as "0.10" as shown in this example.

Delete the example sales tax entry and enter tax rates for any jurisdictions where you must collect a sales tax.

For more complicated tax requirements and data that is kept up to date consider commercial options. There is a TaxWare integration in OFBiz, but this runs through JNI to talk to the native TaxWare libraries (ie non-Java) and requires a lot of maintenance to use over time. Another option available in OFBiz is support for the ZipSales tax database, which can be imported and then updates are imported on a regular basis.

Shipping Settings

Each Store may have one or more shipping options configured. Shipping options consist of shipping methods, shipping providers and rules which link methods, providers and cost estimate calculations. The OFBiz e-commerce demonstration data is preconfigured with a number of shipping methods including "Ground", "Air", "Next Day" and "None" and several well know shipping providers including, United Parcel Service (UPS), the United States Post Office (USPS). In addition, templates for cost estimate rules are provided to ease the customization process. Finally, OFBiz provides interfaces, and in some cases, rudimentary configuration guidance, to allow the e-commerce store to connect directly and communication with several major shipping providers.

4 Expert Recommendations: Similar to the tax calculation set up, the Shipping tab interface includes many variables for shipping and shipping cost calculations. Note that at this time the user interface provided through the OFBiz Catalog Manager is limited. This interface is sufficient for creating new shipment methods and estimates. It is recommended that the provided examples be used as templates for any new configurations desired, but that they be deleted and new ones created rather than trying to edit them.

Selection of the Shipping tab brings up the primary shipping options page (Product Store Shipment Settings) for the currently selected OFBiz store. A summary table of all the currently configured shipping methods and estimates is displayed. This display includes the method type (for example, UPS, Ground, Next Day and No Shipping), some basic estimate information (discussed below) and links to delete the estimate for the method from the store (but not the shipment method itself) and links to view the details of each estimate.

4 Expert Recommendation: select the "view" link on one or more existing methods to get a better understanding of how shipping methods and cost estimates are constructed.

From the Product Store Shipment Settings page, there are two main sub-page links:
New Shipment Estimate
New Shipment Method

The New Shipping Estimate link allows the user to apply a new estimate to the store for an existing shipping method. Shipping methods may have one or more estimates associated with them - ...For example, if the default configuration for "Guaranteed Next Day (UPS) should be changed from no surcharge for a specific feature group to a fixed surcharge for a feature group, this is the place to do it.

The New Shipment Method link provides access to the interface for modifying and creating new Shipment Methods Types and Carrier Shipment Methods (where Carrier Shipment Methods are a combination of a Shipment Method Type and a Carrier Party.)

The New Shipment Method page is the best place to start. Here you can create/update Shipment Method Types, Carrier Shipment Methods (a combination of a Shipment Method Type and a Carrier Party), and then at the top of the page you can associate a Carrier Shipment Method with the Store (this is where most of the options are specified).

Once those are ready use the New Shipment Estimate page to enter price information (kind of like price rules) about a specific Carrier Shipment Method associated with this store.

From either of these two pages you can get back to the summary of all of the cost information for these estimates with the View Estimates link.

UPS Online Rate Estimates

This is used during the checkout process to get an estimate from UPS based on the weights of products being ordered.

You must have an account with UPS to be able to use this service.
NOTE that products MUST have values in their Weight and Weight Uom Id fields for ALL products in order for this to work properly.

If you specify an estimated cost along with this, based on whatever criteria just as with normal shipping estimates, those values are added to what comes back from UPS.

This is activated by creating a shipping estimate record in the Catalog Manager with the Service Name of "upsRateEstimate" on the ProductStoreShipmentMeth record in the serviceName field (ie on the Store Shipment Method associating a Carrier Shipment Method with this Product Store).

For this to work the CarrierShipmentMethod.carrierServiceCode field must be populated (as it is in the DemoShipping.xml file). Ground is 03, Air is 02, Next Day is 01 for UPS. For others see the UpsServices.java file.

This is configured using various properties in the:

${ofbiz install dir}/applications/product/config/shipment.properties file.

  1. UPS XPCI Access License Number
    1. o shipment.ups.access.license.number
    2. o Example: TEST262223144CAT
    3. o This license number is used for both the UPS shipment estimate online service and the UPS XPCI shipping interface services (described below)
  2. Shipper Default Pickup Type
    1. shipment.ups.shipper.pickup.type
    2. Example: 06
    3. Valid options:
      1. 01 - Daily Pickup
      2. 03 - Customer Counter
      3. 06 - One Time Pickup
      4. 07 - On Call Air Pickup
      5. 11 - Suggested Retail Rates (UPS Store)
      6. 19 - Letter Center
      7. 20 - Air Service Center
    4. Choose the option that represents your relationship with UPS. This affects the estimated rate you will get back since UPS varies their prices based on how you get your packages to them.
  3. Estimate split into packages
    1. shipment.ups.max.estimate.weight
    2. Example: "90" meaning 90 pounds
    3. This number is used as the max weight per package when the total weight is > than this weight the weights are split into packages not exceeding max.
UPS XPCI Integration

The UPS XPCI services provide for all interactions between a customer and UPS to register shipments, send weight/size information for each package, get actual prices from UPS, and get images for complete labels to print and affix to each package.

Note that UPS only offers this service to larger customers. The policy may have changed, but last I heard daily pickups must be used and at least 50 packages must be shipped each day (each business day).

These services are integrated with the Shipment code in the Route Segments area and links in the user interface appear when the Carrier Party ID is "UPS".

ß This is configured using various properties in the ${ofbiz install dir}/applications/product/config/shipment.properties file.

ß # UPS Shipper Number
o shipment.ups.shipper.number
o Example: 486915
ß # UPS Bill Shipper Account Number
o shipment.ups.bill.shipper.account.number
o Example: 486915
ß # UPS XPCI Access License Number
o shipment.ups.access.license.number
o Example: TEST262223144CAT
ß # UPS XPCI Access User ID
o shipment.ups.access.user.id
ß # UPS XPCI Access Password
o shipment.ups.access.password
ß # Setting to save files needed for UPS certification
o shipment.ups.save.certification.info=true
o shipment.ups.save.certification.path=/ofbiz/work/ofbiz/upscert
o This option is used to create the artifacts the UPS needs to certify client implementation. It is generally required for each customer to go through this process and for UPS to verify the results. Once this is done the shipment.ups.save.certification.info property should be set to false. For more information on this process, see the UPS XPCI documentation and additional information in the UpsServices.java file.

USPS Online Rate Estimates

This is used during the checkout process to get an estimate from USPS (the United State Postal Service) based on the weights of products being ordered.

You must have an account with USPS to be able to use this service.

NOTE that products MUST have values in their Weight and Weight Uom Id fields for ALL products in order for this to work properly.

If you specify an estimated cost along with this, based on whatever criteria just as with normal shipping estimates, those values are added to what comes back from USPS.
This is activated by creating a shipping estimate record in the Catalog Manager with the Service Name of "uspsRateInquire" on each applicable ProductStoreShipmentMeth record (ie the Shipment Estimate associating a Carrier Shipment Method with this Product Store).

For this to work the CarrierShipmentMethod.carrierServiceCode field must be populated (as it is in the DemoShipping.xml file). Examples include "Priority", "Express", etc.
This is configured using various properties in the file:

${ofbiz install dir}/applications/product/config/shipment.properties

ß # USPS Connection URL & timeout in seconds
o shipment.usps.connect.url
o Example: http://localhost/facility/ShippingAPI.dll
o shipment.usps.connect.timeout
o Example: 60
ß # USPS Credentials
o shipment.usps.access.userid
o shipment.usps.access.password
ß # Estimate split into packages
o shipment.usps.max.estimate.weight
o Example: 70

Store Payment Settings

This page is used to configure the payment processing settings for the various Payment Method Types in OFBiz.

In the demo data you will see configured the test service for all payment methods, including Credit Card, Electronic Funds Transfer (EFT), PayPal, WorldPay, and Gift Cards. It is important to remove all of the "alwaysApprove*" and "test*" service references since those will allow bogus payments to go through.

The only demo configurations that can remain, assuming you want to use them, are the PayPal and WorldPay settings. These don't use configurable services, so the configuration is simpler.

To setup Credit Card (and certain other payment types) processing just specify the services to use for each of the following processes:

ß Payment Authorization Service
ß Payment Capture Service
ß Payment Re-Authorization Service
ß Payment Refund Service
ß Payment Release Authorization Service

All service definitions for the payment processing that are included with OFBiz are in the ${ofbiz install dir}/applications/accounting/servicedef directory.

ß For CyberSource see the service definitions in the services_cybersource.xml file. This includes these services: cyberSourceCCAuth, cyberSourceCCCapture, cyberSourceCCRelease, cyberSourceCCRefund, and cyberSourceCCCredit
ß For ClearCommerce see the service definitions in the services_clearcommerce.xml file.
ß For PCCharge see the service definitions in the services_pccharge.xml file.
ß For RiTA see the service definitions in the services_rita.xml file.
ß For Verisign PayFlo Pro see the service definitions in the services_verisign.xml file.
ß For ValueLink (gift cards) see the service definitions in the services_valuelink.xml file.

Payment Processor Details

While the payment services and high level settings are configured in the Store section of the Catalog Manager the detailed configuration for the various payment processing services are configured in the file:

${ofbiz install dir}/applications/accounting/config/payment.properties

ß There are many comments in this file and sections for each of the major payment processing services.
ß If you are using any credit card payment processor, be sure to check and if necessary change the properties near the beginning of the payment.properties file that follow the pattern: "payment.general.reauth.*.days".

PayPal Payment Setup

The PayPal details for OFBiz are setup in the payment.properties file and have the prefix "payment.paypal.".

The ones that always need to be changed for use of PayPal are:
ß payment.paypal.business - set to an email address on your PayPal account
ß payment.paypal.notify - just change domain name and port to the production values you are using
ß payment.paypal.return - set to the URL where you want PayPal to send customers once payment is complete, typically back to your ecommerce web site
ß payment.paypal.cancelReturn - set to the URL where you want PayPal to send customers when they cancel their payment
ß payment.paypal.image - set to the URL of the image or logo you want PayPal to display to help customers know that the payment is being received on your behalf

The other properties beginning with "payment.paypal." can be set, but unless you know what you are doing we recommending leaving them as-is.

In addition to the settings in the payment.properties file, there is also a setting that you must change on the PayPal web site in your account so that notifications will be sent back to OFBiz to verify payment:
1. Login to your account at PayPal.com
2. Click on the "Profile" link in the header, near the top-right of the page
3. In the "Selling Preferences" column click on the "Instance Payment Notification Preferences"
4. It will show you the current settings. To chance click on the "Edit" button.
5. Check the check box near the top of this page, just under the "Instant Payment Notification (IPN)" heading.
6. Enter the notification URL in the text box. This should be the same as the value of the payment.paypal.notify property in the payment.properties file.
7. Click on the "Save" button.

CyberSource Payment Setup

ß The CyberSource details for OFBiz are setup in the payment.properties file and have the prefix "payment.cybersource."
ß More details to come.

e-mail Settings

This page is used to configure the email messages to send for various events in the ecommerce system.

There is a record for each email in the system by default, but if there is an email that you don't want sent you can Delete the corresponding record here.

For those you do want to keep you will want to change the following fields for each email message, one at a time:
ß 2nd field, From Address, to your preferred customer contact email address
ß 4th field, Bcc Address, to any email address you would like to be copied on each email message
ß The other fields, like the 5th field, the Subject field, can be customized if desired.
If you want to modify any of the templates, we recommend that you copy the templates to your own location, change them there, then change the template locations on this page to point to your files.

Survey Settings

This page is used to configure surveys that are used for various things in ecommerce including random polls that show up on the side bars, special product related surveys to gather additional information about specific products or products in specific categories, surveys associated with the customer profile, and so on.

The demo surveys here can all be removed, though feel free to look at each one to see if it or something like it might be nice to have on your site.

General Settings Override

This page is used to configure product search keyword overrides. These overrides can redirect the user to a specific category, product, or OFBiz or arbitrary URL. For example, when a user searches for the word "gizmo" they are redirected to the Gizmos category (ID 100).

The demo data in place is just an example and should be removed to avoid accidental undesired behavior in product keyword searches on your site.

Catalog, Category, Product Setup

Catalog Setup

Rather than reusing existing Catalogs we will create a new one to associate with the Store we have been configuring, and it will be the only one associated with the Store (unless you want to create multiple Catalogs, of course).

To create a new Catalog:
1. Go to the "Main" in the Catalog Manager and click on the link labeled "Create New Catalog" near the top of the central area of the page.
2. Enter an ID for the Catalog in the Prod Catalog Id field (this cannot be changed later).
3. Enter a name for the Catalog in the Catalog name field.
Unless you know you want to use the special Quick Add categories in this Catalog, I recommend setting the Use Quick Add field to N.
4. The other fields are optional but can be used to customize the look and feel of this Catalog to distinguish it from others (if applicable).
5. Submit the form with the update button.

Once the new Catalog is created, go to the Stores tab and make sure this Catalog is associated with the Store we just configured.

While here, take a look at the Categories tab. We will soon be creating some Categories to use with this Catalog. There are many types here, but the main ones we will be concerned with are:

ß Browse Root (One): this category will be the parent category of all of the top level browse categories for the catalog. It will not be visible to the customer, but it's children will be the main or top-level browse categories.
ß Promotions (One): the products in this category are listed on the default eCommerce Main page. Of course, that page can be customized to show other things, but if you are using the default OFBiz ecommerce templates main page, you should create a Promotions category to configure which products will be displayed there.
ß Default Search (One): if a Default Search category is configured  only the products in this category will show up in product search results. This category can also have Feature Categories and Feature Groups with it, and the Features in those groups will be used to populate the parametric search drop-downs on the Advanced Search page. Of course, when searching within a specific Category only the features associated with that category will be used for the parametric search drop-downs in the Advanced Search page.
ß Purchase Allow (One): if a Purchase Allow category is configured only the products in that category will be available for purchase when this catalog is active. In that case if a product not in this category is put in the cart an error will be shown to the customer. In general for easier maintenance it is best to have this set to the same category as the Default Search category.
ß View Allow (One): if a View Allow category is configured only the products in that category will be visible when this catalog is active. Other products will not show up in search results, category browsing, and if someone tries to view the product by ID it will report that no product is found for this ID. There is a performance impact associated with the use of this category, so alternatives might be desirable in certain circumstances. In general for easier maintenance it is best to have this set to the same category as the Default Search category.

Category Setup

As described in the Catalog Setup section there are various basic Categories that we need to create for our new Catalog. We will create four categories:

1. A Browse Root Category
2. A top-level browse Category to be a child of the browse root category
3. A Promotions Category
4. An "All Products" Category that will be setup as the Default Search, Purchase Allow and View Allow categories for our catalog.

To Create a Category:
1. Go to the "Main" in the Catalog Manager and click on the link labeled "Create New Category" near the top of the central area of the page.
2. Enter an ID for the Category in the Product Category ID field (this cannot be changed later).
3. All of these categories can use the "Catalog" setting for the Product Category Type field.
4. The other fields can be set, but are not necessary. Note that Category hierarchies do not use the Primary Parent Category field, instead they are done with the Rollup tab once the Category is created.
5. Submit the form by clicking on the update button.

Once the Category is created go to the Content tab and look near the bottom of the page in the Override Simple Fields section to set a Description, and if desired also a Long Description.

For each of the categories that we are creating, go to the Catalogs tab in the Category section, or the Categories tab in the Catalogs section and associate them using the appropriate type(s) as described above.

For the top-level browse Category that will be a child of the Browse Root Category associate them using the Rollup tab for whichever one you create second. Both parent and child categories can be setup there.

Product Setup

Congratulations, you are finally to the point where you can start setting up products....

To create a Product follow a process similar to those described for other things, like Categories.
1. Go to the main page of the Catalog Manager and click on the "Create New Product" link.
2. If you fill in an ID it will make sure that ID is valid, and if so it will use that one. If you specify no ID it will generate one.
3. Set an Internal Name that makes it easy for you to recognize the product. This name will be shown in the admin tools, but not to the customer.
4. Note that if you are using the UPS or USPS or other online rate estimation utilities then you must have values in the "Weight" and "Weight Uom Id" fields.
5. Submit the form to create the product.

Add Content to the New Product
1. Click on the "Content" tab/button for the product you just created. Here you can setup text and images for your product.
2. You will see some forms at the top for administering managed content (ie from the Content Manager) with the product. For more advanced product related content needs use this, but for more common and simple needs, this can be more difficult to administer and slower at run time.
3. Near the bottom of the page is a section labeled "Override Simple Fields". Here you will typically want to specify a Product Name, Product Description, and Long Description. If you have images to associate with the product, you can specify their locations here, or upload them. Note that there are default locations for the images (can be quickly set by clicking on the "[.jpg]" or "[.gif]" buttons). We recommend using these locations, but of course you can put your images anywhere. These can be an absolute URL, or will be relative to the current server address, or the content URL prefix if one is specified in the url.properties file.

Add Prices to the Product
1. Product pricing in OFBiz is very flexible. There are two main aspects to it: Prices and Price Rules. This is independent of promotions, which are applied after the price calculation is done.
2. For basic operation you should have at least one type of price setup for each product: the Default Price. This is the price that is used when no rules apply.
3. To add a Default Price go to the Prices tab for the Product, and use the form at the bottom of the page.
ß The Product Price Type Id should be "Default Price", the Currency Uom Id should be whatever currency the price is in, and the Product Store Group Id can be left as Not Applicable, unless you are setting up multiple groups of stores that have different pricing.
ß The From Date can be now or in the future, if you want the price to take effect in the future. The Thru Date is optional, but can be used to specify that this particular price expires at a certain date and time. Note that if there are multiple prices of the same type, etc that are active at once, it will use the one with the most recent From Date. This is useful when you want a temporary price to override the normal "Default" price of the product.
4. If you are using price rules or may do so in the future you may also want to enter information such as the List Price and the Average Cost which are often used in the price calculations.
5. Note that if a Minimum Price is set the price will never be less than that. So, even if the Default Price is to 2.00 and the Minimum Price is set to 3.00, then 3.00 will be used as the calculated price. The Maximum Price setting works the same way as the ceiling for the price.

Make sure to put each product in a browse category, and in the All Products category so that it can be searched for, viewed, and purchased in your catalog.

Expert Recommendation: These are the basics, but there is a lot more information about products that you can, or may need to, setup. We recommend reviewing the more detailed documentation or engaging the services of an experienced consulting to help you through this.

Advanced Catalog Setup: Features, Promotions, Price Rules, Keyword Thesaurus, Features for special functionality or parametric search, Moderated (or unmoderated) Product Reviews, Configurable and Manufactured Products, Virtual and Variant Products, Inventory/Facility/Location settings, and so on

See the end-user documentation space for details on how to set these things up and what they mean. Also see this for more advanced options for Products, Categories, and so on.

POS Setup Process

The Point-Of-Sale (POS) component in OFBiz is still maturing, but is a very flexible and capable enterprise class POS solution that features:

  • templated receipts
  • XML file configurable screens
  • jPOS hardware support
  • multi-tiered synchronization of product, price, promotion, party, order, and other data related to POS deployment and operation

The POS system is designed to run with its own database in a totally stand-alone mode. This was done so that even if the machine is totally cutoff from the network it can still operate.

To run OFBiz in the POS "mode" just run: "java -jar ofbiz.jar -pos".

Note that this uses the pos-containers.xml file instead of the ofbiz-containers.xml file and by default it doesn't load a web container (ie Tomcat or Jetty), but that can certainly be added by changing that file.

The Store for the POS needs slightly different settings than for a web store.

There is an example POS Store in the demo data.

One of the differences to note is that the POS Store should always have the Is Immediately Fulfilled field set to Y, whereas for an online store or other mail or phone or store it should be set to N.

The POS Store should also have Manual Auth Is Capture set to Y, and typically Check Inventory and Require Inventory should be set to N.

There are many files under the ofbiz/applications/pos directory that you may want to customize as you set it up.

The receipt templates are .txt files in the config directory there.

The screens are configured through XUI in various files under the screens/default directory.

Button events are configured in the config/buttonevents.xml file.

There are example synchronization settings in the data/PosSyncSettings.xml file, which is just an Entity Engine seed data file that gets loaded into the database.

This example is for 3 tiers: a Main Central Server (MCS), a Per-Store Server (PSS) and the Point-Of-Sale client (POS). There are example sync settings to do 4 data moves including MCS -> PSS, PSS -> POS, POS -> PSS, and PSS -> MCS.

This uses the Entity Synchronization service in the Entity Engine and the XML import file for this has pretty good comments about what does what.

Note that the services shown in the example are configured to use the location "entity-sync-rmi" which is a pre-defined location specified in the serviceengine.xml file.

Note that to help avoid duplication of sequenced IDs in the data that is synchronized up the chain from the POS terminals a unique prefix should be setup for the Entity Engine using the sequenced-id-prefix attribute of the delegator element in the entityengine.xml file.

  • No labels