CMSCart Manual





ERP Connection and Communication

CMSCart is designed with the option to connect to an external ERP or other such inventory system. This gives CMSCart an astounding advantage over other cart softwares by providing live inventory to your webstore. While others will have you include duplicate information about your inventory in both your ERP and webstore, CMSCart communicates directly to the ERP in real-time, removing data redundancy and improving the functionality of your webstore-ERP relationship. To accomplish this great feat, CMSCart needs 2 things: a database connection to your ERP or inventory system, and an API of functions to act as the go-between between the webstore and the ERP.

Setting the ERP Connection

The ERP database connection parameters are set in the Template Globals area. To connect to the ERP database, you must provide the name of the ERP database, the host of your erp (this could be an IP or domain), and the user name and password used to connect to your ERP. See the section on Template Global ERP Properties for more information on setting these. If you do not set these properties, error messages will display whenever your try to access the ERP in your webstore.

Including the ERP API

The ERP API includes all the functions that communicate with the ERP database to retrieve items, sales categories, prices, etc. The API is a PHP file that must be included in the CMSCart system. An API is available wherever you obtained this distribution; you can use this API verbatim if you have the right ERP system, or you can modify it to work with a different ERP system. Additionally, you can write your own API and include it within CMSCart (see the next section about required API functions). If you plan on including an ERP API, set the path to the file you wish to include using the ERP API Path in Template Globals. This path is relative to the main CMSCart directory (for example, from "C:\apache2triad\htdocs\cmscart"). So, if you have included the API file in the main directory, specify the path as "erpapi.php". Or if you have included the file in a sub-directory such as "includes", specify the path as "includes/erpapi.php". Failure to set these properties will cause your webstore to not make the function calls necessary to certain areas of the system, not providing you with the fullest functionality.

ERP API Functions

The following are the functions that are used throughout the system that come from the ERP API. If you plan on accessing these functions through the pre-built API or a custom API, you need to have these functions in order for the webstore to operate properly: