ExperShop - Application configuration


Home Contents

Please email any bug reports, comments or suggestions to ExperLog's Online Support


Overview

ExperShop can support multiple shops: Each shop has its configuration file, that defines a set of properties: the database driver, user and password, the currency unit, etc...

A global configuration file defines, for each shop, the path to its specific configuration.

ExperShop global configuration file

This file associates shop names to shop configuration files: it contains one entry for each shop, plus one called "default" that will be used when ExperShop is invoked with no shop name specified.

If you have only one shop on the server, you can directly use this file as a shop configuration file: see next chapter for the file format.

By default, the configuration file name is EShop.cfg on Unix, and EShopWin.cfg on windows, and is located in the web server's root directory for user files.

This default name can be changed, by setting servlet init properties:

  • SHOPDIR is the name of the directory that contains the configuration file (default : none).
  • SHOPCONFIG is the configuration file name (default: EShop.cfg, EShopWin.cfg on windows).
Note that you can specify all the information in the SHOPCONFIG variable (the full path to the configuration file): in that case, do not declare the SHOPDIR variable.

File Format:


default: defaultPath
Shop1: shop1Path
...
ShopN: shopNPath
The "default" entry is optional.

Example (Windows):


default: c:\\SurfShop\\surf.cfg
SurfShop: c:\\SurfShop\\surf.cfg
Supermarket: c:\\Supermarket\\super.cfg
Note that on windows, "\" characters in file paths must be duplicated (on Unix, a path will look like /users/SurfShop/surf.cfg).

Shop Configuration File

Each shop requires a shop configuration file.

The configuration file defines the following properties:

License Number Configuration
Property Description Default value
shop.License The ExperShop commercial license number (Optional).
If no commercial license number is specified, ExperShop will display a popup window with an ad banner for ExperLog upon each new session.
There is no other license restriction: you may use ExperShop for free, but it will advertise for us.
ExperShop commercial licenses are sold online on experlog's web site (http://www.experlog.com).
none
JDBC Configuration
Property Description Default value
jdbc.Driver The JDBC Driver class com.expershop.db.DummyDriver
jdbc.Url The JDBC URL jdbc:expershop:default
jdbc.User The database user name empty string
jdbc.Password The database password empty string
jdbc.MaxConn The database max number of connections 1
jdbc.MinConn The database min number of connections 1
jdbc.TxIsolation Seldom used parameter. Defines the database transaction isolation level. Possible values are NONE, READ_COMMITTED, READ_UNCOMMITTED, REPEATABLE_READ, SERIALIZABLE. No value (means default value for this JDBC driver).
jdbc.cacheRS Cache JDBC ResultSet columns: true, or false.
This option should be set to true only when necessary, and if you don't trust your JDBC driver (some JDBC drivers, particularly when using ODBC, don't allow to access twice the same column in a tuple : this is an implementation bug).
false
jdbc.threadSafe Tell ExperShop if your JDBC driver is thread-safe or not: for example, the JDBC/ODBC bridge with the Microsoft Access ODBC driver is not thread safe, the Oracle thin JDBC driver is thread-safe.
Set this field to false only if necessary, because of its impact on the overall performance.
true
jdbc.PreOpen Used as a workaround for a bug with some JVMs / JDBC drivers: before 1st use, the connection is opened then closed. This may cause problems with some drivers, use only if necessary. false
sqlencode.Substitutions A list of substitutions to be made when using (SqlEncode): for example, a single quote must be duplicated in an Oracle request ("I'm here" becomes "I''m here"), and replaced by "\'" in an InstantDB request ("I'm here" becomes "I\'m here").
The syntax of sqlencode.Substitutions is:
c1=s1;c2=s2;...cn=sn (replace char c1 with string s1, char c2 with string s2, etc...)
The suggested value for Oracle is: \'=\'\';\r=\" \";\n=\" \";
\'=\\\';\r=\" \";\n=\" \";
SHOP Configuration
Property Description Default value
shop.AdminPassword The shop administrator password admin
app.RootDir The application's Root directory empty string
app.HomePage The application's home page (relative to the application's Root directory) EShop.tmpl
app.MaxClients The maximum number of sessions alive for this application. Infinite
shop.Currency The currency unit USD
shop.tax.defaultzone The default zone name for value added tax calculation none
shop.tax.[zone-name].rate The value added tax rate for a given tax zone none
shop.tax.[zone-name].taxincluded Tells wether product prices already include taxes or not (values: true or false). false (tax are not included).
shop.tax.[zone-name].includeshipping Tells if taxes should apply on shipping costs just like on products (values : true or false). true : taxes apply on shipping costs.
shop.shippingcost.defaultzone The default zone name for shipping cost calculation none
shop.shippingcost.[zone-name].rate The shipping cost rate for a given shipping cost zone none
shop.shippingcost.[zone-name].type The shipping cost type for a given shipping cost zone.
Type should be one of:
  • FLAT (the zone's rate is the shipping cost value)
  • QTY (the shipping cost value is equal to the zone rate multiplied by the number of items in the cart)
  • WEIGHT (the shipping cost value is equal to the zone rate multiplied by the weight of all items in the cart)
  • WEIGHT_TABLE (the shipping cost value is equal to the zone rate - stored in a database table - multiplied by the weight of all items in the cart)
  • PRICE (the shipping cost value is equal to the zone rate multiplied by the total price of items in the cart, tax not included)
none
shop.shippingcost.[zone-name].weightcolumn The name of the column in the EProduct table that contains the product weight to be used for this zone. Weight
shop.NeedPassword A boolean flag (true or false): if true, customers will require to type their password at login time, and the password will be checked; if false, passwords won't be enforced false
app.Timeout The remote client session inactivity timeout in seconds 3600
app.Locale The application's locale: used for number and date formats.
The locale's syntax is the same as the syntax specified for java locales: Language_Country[_Variant]
For example, en_US for US english, fr_FR for french.
None (use the system's locale)
session.ontimeout The path to a template to be activated upon session timeout.
Relative to the application's root directory.
None
Order Confirmation
Property Description Default value
email.MailHost Mail Host name or IP address none
email.MailPort Mail server port 25
email.From Shop's email address (will be put in the "From" part of the message) none
email.ManagerEmail Shop Manager's email address (if order confirmations must be sent to the shop owner, for example) none
email.ManagerSubject Email subject for the shop manager's order confirmations New Order
email.ManagerTemplate A path to a template file that will be expanded to produce an e-mail sent to the shop manager when a customer places an order; The path is relative to the app.RootDir value none
email.CustomerSubject Email subject for the customer's order confirmations Your Order
email.CustomerTemplate A path to a template file that will be expanded to produce an order confirmation e-mail sent to the customer; The path is relative to the app.RootDir value none
log.Logfile A path to an ASCII file that will contain an order log (all orders will be logged there); The path is relative to the app.RootDir value none
log.Template A path to a template file that will be expanded to produce an ASCII order log; The path is relative to the app.RootDir value none
Secure Payment: see the corresponding documentation
Property Description Default value
shop.KeepPreOrders Possible values: true (keep pre-orders upon session timeout) or false (delete pre-orders upon session timeout).
Some secure payment technologies are asynchronous: ExperShop lets the bank's site operate the payment, then the bank tells ExperShop when the transaction is over.
For those payment systems, ExperShop "pre-orders" the shopping cart content (the order is saved in a "PREORDER" state), and 2 strategies are possible:
  • By default, if the bank never returns any transaction status, orders in "PREORDER" status are kept in a "TIMEOUT" status upon session timeout - this may be useful to prevent transaction errors due to network incidents or bank server crash.
  • if "shop.KeepPreOrders" is set to "false", orders in "PREORDER" status are destroyed upon session timeout (see app.Timeout).
true: pre-orders are not destroyed upon session timeout.
Datasources
Property Description Default value
datasource.list List of available datasources for the current application, this list contains names, separated with comma. empty string
datasource.[datasourceName].Driver The JDBC Driver class empty string
datasource.[datasourceName].Url The JDBC URL empty string
datasource.[datasourceName].User The database user name empty string
datasource.[datasourceName].Password The database password empty string
datasource.[datasourceName].MaxConn The database max number of connections empty string
datasource.[datasourceName].MinConn The database min number of connections empty string
datasource.[datasourceName].TxIsolation See jdbc.TxIsolation. empty string
sqlencode.[datasourceName].Substitutions A list of substitutions to be made when using (SqlEncode) for a given datasource (datasourceName) : for example, a single quote must be duplicated in an Oracle request ("I'm here" becomes "I''m here"), and replaced by "\'" in an InstantDB request ("I'm here" becomes "I\'m here").
The syntax of sqlencode.Substitutions is:
c1=s1;c2=s2;...cn=sn (replace char c1 with string s1, char c2 with string s2, etc...)
The suggested value for Oracle is: \'=\'\';\r=\" \";\n=\" \";
\'=\'\';\r=\" \";\n=\" \";
Miscellaneous Configuration
Property Description Default value
trace.level trace level:

DEBUG
INFO
WARN
ERROR
FATAL

INFO
trace.file traces output file, if the file is not set, all trace will be logged on the error stream (error_log under Apache) none
contenttype.list Comma-separated list of allowed ContentType aliases. Each alias will be associated to a MIME type (see below the contenttype.[typename].value properties), and can be used as a value for the ExperShop servlet's ContentType parameter.
Example: contenttype.list: xml,jpeg
none
contenttype.[typename].value Defines the MIME type associated to each ContentType alias defined by contenttype.list ([typename] is to be replaced by the corresponding name, as declared in the alias list).
Example: contenttype.xml.value: text/xml
none
console.applicationoff error template when the application an error occurs ou when the application is stopped. none
app.DelegateConfig absolute path for a file which will contains the saved configuration via the administration console. none
app.UploadDir absolute path for a directory used to compute the path of an uploaded file. If this property is not specified, the "upload" function does not work. none
urlencode.charset Default charset for URL Encoding. The default is more suitable for western Europe, other countries may prefer to set this property to UTF-8. ISO-8859-1

Notes

On Windows, if you specify file paths that include "\" characters, duplicate them in the configuration file (example: C:\ExperSHOP\Mystore.cfg should appear as C :\\ExperSHOP\\Mystore.cfg in the config file).

Example (Windows):


jdbc.Driver: sun.jdbc.odbc.JdbcOdbcDriver
jdbc.Url: jdbc:odbc:my_shop
jdbc.User: john
jdbc.Password: mcenroe
jdbc.MaxConn: 1

shop.Name: MyShop
shop.ManagerEmail: john@myshop.com
shop.ManagerTemplate: ESTemplates\\EMail\\manager.tmpl
shop.AdminPassword: admin
shop.Currency: USD
app.Timeout: 7200
app.RootDir: C:\\ExperSHOP\\shops\\lite\\ESRootDir