Products »
osCommerce Sales Forecasting » Here
This application is no longer maintained by Lokad.
we suggest to use to Lokad Safety Stock Calculator instead.
Developer guide for Lokad osCommerce
This document provides technical information about
Lokad osCommerce Sales Forecasting. The purpose of this document is to help a developer to understand (and possibly to extend) our PHP application. This document is not intended to be used by regular users, instead we suggest to refer to
Getting Started and to the
User Guide.
Getting the source code
The PHP contribution has been developed and tested with PHP 4. You can retrieve the latest version of the source code from the
Subversion repository of the 'lokad' project on Sourceforge.net. You will need a Subversion client to retrieve the code. You do not already have such a client, we suggest
TortoiseSVN.
Subversion URL: https://lokad.svn.sourceforge.net/svnroot/lokad/oscommerceLokad osCommerce settings
Lokad osCommerce settings are handled using osCommerce standard configuration system. A configuration group called
Lokad is added. Nine parameters are created in this group. Their configuration keys start with
LOKAD_. For more info about these parameters, please refer to the
setup guide.
Install / Uninstall scripts
Lokad Sales Forecasting for osCommerce uses the osCommerce database to stores its preferences. It also creates two tables,
lokad_update and
lokad_data which are necessary to handle data upload and forecasts downloads.
When the plugin is used for the first time, it initializes the database by calling the script
oscommerce/catalog/admin/includes/classes/lokad/install.php. The install can also be forced by accessing URL
/admin/lokad.php?step=install.
oscommerce/catalog/admin/includes/classes/lokad/uninstall.php removes all traces of Lokad from the osCommerce database. It is called by accessing URL
/admin/lokad.php?step=uninstall.
Sales data retrieval from the osCommerce
Uploading sales data actually requires two steps: retrieve sales data from the osCommerce database, and send them to Lokad.com. These two tasks can be fully separated.
We call the module that retrieves sales data a
provider. Porting Lokad for a given application basically means writing a suitable provider. Lokad Sales Forecasting for osCommerce directly reads sales data in the MySQL database.
Interacting with the Lokad Web Services
The
NuSOAP library is used to interact with Lokad web services. If you are interested in accessing Lokad web services within a PHP application, you can
read our tutorial.
This library is included in the plugin distribution under
/catalog/admin/includes/classes/lokad/lib/.
Internationalization support
Currently, Lokad Sales Forecasting for osCommerce is only localized in English. All text strings used by the plugin are defined in
/catalog/admin/includes/languages/english/lokad.php. Localizations for other languages can be written by duplicating this file to
/catalog/admin/includes/languages/your_language/lokad.php and translating the strings.