ExperSHOP
Lite Servlet
Home
Contents
Please email
any bug reports, comments or suggestions to ExperLog's Online
Support
ExperSHOP
Lite servlet
Its role is
mainly to expand DynHtml pages to generate dynamic HTML content.
Everything
that concerns the session handling (who is connected) and the shopping
cart management is transparent to the user.
ExperSHOP
Lite comes with one servlet class:
-
com.expershop.lite.ExperSHOP ,
the ExperSHOP Lite servlet: tell it which DynHtml page to expand, and
what action to perform.
The ExperSHOP Lite servlet is aware of the customer's shopping cart
content (through a Data Set called "ShoppingCart", chat can be used
in the templates to iterate on the shopping cart and display its content,
the total price, etc...)
Expected
HTTP parameters
The ExperSHOP
Lite servlet expects the following HTTP parameters:
-
Page
: The DynHtml page to expand, relative to the ESRootDir/ESTemplates/Shop
directory (MANDATORY)
-
Action
: The action to perform before expanding the DynHtml page (OPTIONAL)
Example: the predefined ESAddToCart action can be used
to add an item in the shopping cart before displaying its content.
See the ExperSHOP Actions
tutorial for more details.
-
ActionFailed
: The DynHtml page to expand is an action fails (OPTIONAL)
This parameter makes sense only if the Action parameter has a value.
-
Cache
: If present (whatever its value), the next page will be cached by the
web browser; default is no cache.
- The ExperSHOP
Lite cookie information: necessary for ExperSHOP to keep track of who
is connected.
- Any other
parameter that can be necessary for ExperSHOP to expand the next DynHtml
page (example, a Product Reference to invoke a dynamic page that details
products).
The first time
the servlet is invoked, a shop name can be specified, using an HTTP parameter
called "S_": this is for multiple shop support.
Example
:
<a href=com.expershop.lite.ExperSHOP?S_=SurfShop> Bill's Surf Shop</a><br>
<a href=com.expershop.lite.ExperSHOP?S_=Supermarket> Online SuperMarket</a><br>
Example of
a link to an ExperSHOP page, in a DynHtml page:
<a href=com.expershop.lite.ExperSHOP?$COOKIE$&Page=ESListDep.tmpl>
Departments</a>
$COOKIE$ is
expanded into all the necessary information for ExperSHOP.
Page tells ExperSHOP which DynHtml page to expand when the link is clicked.
See the DynHtml
tutorial for more details.
Shopping
Cart, and Predefined data sets
In DynHtml template
pages, you can loop on data sets (like query results) and display their
content.
Some data
sets are predefined, and always accessible:
- The Shopping
cart (data set name:
ShoppingCart ): see the using
the shopping cart document.
- The Shop
configuration file (data set name:
ShopConfig ): any property
in the shop configuration file can always be displayed from a DynHtml
template by specifying $ShopConfig:[property-name]$ ; For
example, $ShopConfig:shop.Currency$ displays the value
of the shop.Currency property.
- The current
date (data set name:
CurrentDate ): see the working
with dates document.
|