The Web Store installation consists of two main program files:

WebStoreMain - the Web Connection Server


The Wizard generates a bunch of code into your mainline program. For completeness the insertions are described here. Lets assume you have a main program called WebDemoMain with a class called WebDemo.

WebDemo::SetServerProperties
The Wizard inserts code here to add wwStore into the FoxPro path and adds the wwStore class library to the Class libraries loaded:

DO PATH WITH "wwstore"
SET PROCEDURE TO wwXMLState ADDITIVE
SET CLASSLIB TO wwStore ADDITIVE

WebDemo::Process
The Wizard adds handlers for "wwstore" URL parameters and the wws extension:

      CASE lcParameter == "WWSTORE"
         DO wwstore with THIS

     CASE lcExtension == "WWS"
        DO wwstore with THIS

New wwStoreConfig Class
The Wizard creates a configuration class for the wwStore application. This class contains several configuration settings which will be written into the WebDemo.ini file the first time the application is run. The class looks as follows:

*** Configuration class for the wwstore Process Class
DEFINE CLASS wwstoreConfig as wwConfig

cHtmlPagePath = "d:\inetpub\wwwroot\wwstore\"
cDataPath = ".\wwstore\"

cStoreName = "West Wind Technologies"
cXMLDocRoot = "wwstore"
cAdminUser = "Any"
lSecureOrderPage = .F.
cCookieName = "WESTWINDUSER"
cBannerFile = "wwSitebanners"
cBannerAlias = "wwSitebanners"
cMailServer = "mail.server.net"
cMailFrom = "Your Name"
cMailFromEmail = "your@email.com"
cMailCC = "another@email.com"
cSQLConnection = ""
cCCProcessor="ACCESSPOINT"
cCCStore=""
cCCStorePassword=""

ENDDEFINE

This class maps to the settings in the [wwstore] section of WebStore.ini which is loaded on the application's startup loading these properties on the server config object. The wwStore Process class makes these settings available via a Private CONFIG variable.

Note that you will need to edit the WebDemo.ini file to configure these values for your application later on.

WebStoreConfig::Init
In order for this new configuration class to load, a new owwStore object is added to the WebStoreConfig class and the object is created in the Init of the class:

***************************************************************
DEFINE CLASS WebStoreConfig AS wwServerConfig
***************************************************************

owwMaint = .NULL.
owwstore = .NULL.

*** ADD CONFIG OBJECT TO CLASS ABOVE - DO NOT MOVE THIS LINE ***

FUNCTION Init

THIS.owwstore = CREATEOBJECT("wwstoreConfig")

*** ADD CONFIG INIT CODE ABOVE - DO NOT MOVE THIS LINE ***

THIS.owwMaint = CREATEOBJECT("wwMaintConfig")

ENDFUNC

ENDDEFINE
*EOC WebStoreConfig

The wwStore Process class


The wwStore.prg file and the Process subclass contained within it is perfectly static and not custom generated by the Wizard.


Last Updated: 5/31/2003 | Send topic feedback