osCommerce Integration



The xTuple-OSCommerce Module (which is available for free on the xChange) provides for an easy way to integrate xTuple ERP functionality with an eCommerce web site. xTuple is a leading open source ERP installation for the Max, Linux, and Windows environments.

OSCommerce is the leading web based open source eCommerce platform. With this combination businesses are able to maintain customer data, order details, fullfillment, and inventory data.

This document provides installation and configuration instructions for the xOM add-on. Please read the entire document before performing the installation.


xOM requires that the following software is already installed.

  • xTuple 3.2.0
  • OSCommerce 2.2rc2a


The installation instructions assume that xTuple and OSCOmmerce have already been installed and properly configured. Should that not be the case, then please install both software packages prior to continuing with the installation of xOM.

  1. Unzip the xOM zip file.
  2. Backup your OSCommerce directory.
  3. If the OSCommerce installation does not contain any customizations (user interface or add-on installations) then you can simply overwrite the files in your OSCommerce install.

Otherwise you must perform a diff to merge your customizations with the xOM files. The following files are unique to xOM and can be copied into the catalog folder of OSCommerce without any problems

  •     catalog/admin/includes/languages/english/xtuple_config.php
  •     catalog/admin/xtuple_config.php
  •     catalog/includes/functions/xtuple.php

The following files are modified from the original OSCommerce install and must be merged

  •     catalog/admin/includes/languages/english.php
  •     catalog/admin/includes/boxes/tools.php
  •    catalog/admin/includes/filenames.php
  •     catalog/includes/application_top.php
  •     catalog/includes/filenames.php
  •     catalog/account_edit.php
  •     catalog/address_book_process.php
  •     catalog/checkout_process.php
  •     catalog/create_account.php

Once the files have been copied and/or merged you are ready to configure the module.


  1. Log into the admin section of OSCommerce
  2. Click on the Tools menu item at the bottom of the left hand list
  3. On the new menu select the xTuple Configuration link on the bottom of the left and list
  4. Fill in the connection fields of the xTuple configuration screen form and click next
  5. If the application is able to make a connection to the right database, then you will need to select all the required fields from the various drop down menus and enter the needed text entries. Hit save if you have entered all fields. Below is a quick review of each field.
Server Location (IP or Name): The hostname of the server that hosts your xTuple database
Database Port: Network connection port of your xTuple database - usually 5432
Database Name: Name of your xTuple database instance
Username: Username you use to access your xTuple database - this account must have read and write permissions
Password:  Password you use to access your xTuple database
Sales Rep (ID Number): Select the sales rep that will be credited with the sale - you may want to set up a sales rep "Internet Sales"
Customer Type (Code): The customer type dictates as what customer type an OSCommerce customer is stored - you may want to set up a customer type of "Internet Customer"
Cust ID Prefix: Enter a value you would like to use for a prefix for all customers generated via the osCommerce store, eg. "web-" or "osCommerce" in order to avoid customer ID duplication between OSCommerce and xTuple
Terms: Enter the default order terms for the customer, selected from the "Terms" values in your xTuple database, e.g. "Due on receipt"
xTuple Warehouse (site): Select which warehouse is credited with the inventory reduction of a sale - most likely "warehouse1"
xTuple Credit Card Encryption Key: This encryption key is an alphanumeric string such as "mykey1" used to store sensitive data in xTuple. The key must be entered or sales transactions will not be logged in xTuple. To set the encryption key in xTuple, make a text file that contains the key string and save it at a location in your file system. Then go to System | Master Information | Encryption, and enter the location of your key file. For the osCommerce configuration, enter the alphanumeric key value, e.g. "mykey1", directly into the xTuple Credit Card Encryption Key field
Do you sell/ship physical goods: Select "No" if you offer services or digital goods that have no shippable components
Integration Active: Select "Active" if you want to activate the xTuple integration module

Once the form is saved, the user must now configure the inventory so that products in both systems can be matched up. If this is not done, then the module has no way of locating OSCommerce inventory in xTuple in order to manage inventory levels and order data in xTuple.

Click on the Catalog link in the left hand list and then step through all your inventory in the Categories/Products section of the OSCommerce admin site and edit each product. For each product that you want to match up fill in a unique value into the Products Model field. If you are already using a value in that field, then simply copy the value down since it will need to be used in xTuple as well. Once a value has been entered into the Products Model field, you can then access xTuple and enter the same value into the UPC code field. xOM makes a connection between the two inventory system through the Products Model field in OSCommerce and UPC field in xTuple.

Once the inventory has been mapped you are ready to use xTuple in conjunction with OSCommerce.


Q. After I entered the configuration data in the admin section the data does not seem to save properly.

A. Make sure that the permissions settings allow your web server to save the config file into the same folder that contains the catalog folder.

Q. When select a product for purchase, the inventory is not diminished in xTuple.

A. Make sure that the Products Model field in OSCommerce matches the same value in the UPC field in xTuple for the same product.