Step 2 - Web Store Configuration

This step involves configuring many of the generic settings of the Web Store, such as the name of the store, your company, information about how emails are sent for confirmations and error notifications, setting up Payment processing and some operational configuration for the store in general.

Tabbed Interface:
This form uses a tabbed interface for its many configuration options. Changing tabs does not cause the form to save or submit the data to the server - all the pages are treated as a single page and submitted only when you press the Save button on the bottom.

The setting changes on this page are stored in the web.config file for the application in the Web root for this application. Most of the settings can also be changed directly in the Web.config file, except a few of the sensitive ones like the connection string and passwords which are encrypted. Please note that saving requires that the application user account (NETWORK SERVICE/ASPNET or ISP assigned account) has rights to write to the web.config file. If write access is not available an error message informs you that the changes could not be saved. Any change to the configuration causes the Web application to restart, so there will be a slight delay.

Here are the forms along with descriptions of the settings.

Main Configuration Settings

Company Name
This is the name of your company. This value is used in confirmations, copyright notices and any information that points back to the company.

Web Store Name
This name goes on the logo band and is used whenever the store is referenced.

Tax State and Tax Rate
If your state requires sales tax you can set the state and tax rate. Whenever an order is received for that state the tax rate is automatically applied to the subtotal.

Store Base Url
This is the full URL to your Web Store including the trailing backslash. This is used to create relative URLs dynamically. Example:

http://localhost/webstore/

Note: this url should match the site you're currently working on (ie. localhost) and then be switched when you upload the site to a live server.

Store Base Virtual
Like the URL the virtual path is used internally to create dynamic URLs. It's just the Web server relative path. Should contain the leading and ending slash. For example:

/webstore/

Use SSL/HTTPS links
This option determines whether the link to the Order page runs using SSL. If you do use SSL you will need to have an SSL certificate installed on the server in order for HTTPS to work.

Inventory Category List Display Mode
You can choose from 3 different display modes for Inventory items for item lists:

Number of items per page to display
This is the number of items per page that you want to display in Item lists above. Good default values for these are 20, 5, 10 respectively.

Email Settings

Mail Server and optional login info
This is the mail server IP address or domain name that's used for email confirmations and administrative alerts. Make sure the server you choose is valid for your Web Server and supports relaying for your server's IP address or domain. The username and password are optionally available to let you access mail servers that require authentication.

Email Confirmation Information
Email confirmations are sent to customers when an order is completed. These addresses are also used to further communicate with the customer for example for Declined Credit Card Order notifications. The Sender name is the display name of the Sender for example, Rick Strahl or more likely West Wind Web Store or West Wind Technologies. The email address is the return email address. The Mail CC List is a list CC email addresses you can specify to allow you to receive notifications whenever an order occurs. The CC list can be comma delimited so you can specify multiple recipients.

Administrative Email Confirmation Details
Administrative emails can be sent on errors in the application occurs. This lets you immediately know when an error occurs. To enable this feature click the Send Administrative Emails and specify a descriptive sender name and email address. Configuring these values smartly is useful as you can filter these messages directly in your email client.

Credit Card Payment Processing Configuration

This page allows you to configure credit card or PayPal payment processing. The store works with several credit card gateway providers including Authorize.NET, PayFlow Pro, LinkPoint, AccessPoint and BluePay. The store also works with the PayPal Standard Web interface, which allows you to very quickly accept payments without any special setup other than a PayPal business account.

Process Payments with
This selection of checkboxes allows you to select what types of payment processing are allowed. CreditCards and PayPal are fairly obvious. PurchaseOrders allows customers to create a Request for Purchase form that can be used in the process of creating a Purchase Order. These requests are not immediately confirmed and instead simply saved for later processing or for use by the Offline Application.

Process Credit Cards Online
This option allows you to configure whether credits are processed right at the point of the sale. When checked the store will go out and try to validate the card and charge the amount specified. If not checked items, no credit card processing occurs at the time of sale and nothing is shipped to the customer.

In both cases an order confirmation is sent, but only if cards are processed are any items that can be electronically shipped confirmed. This option basically allows you to hold off on CC processing for a later time either through the administrative interface on the site or through the Offline Application.

Credit Card Processing
Regardless of whether you process online or in admin choose one of the supported providers. Pick the URL or Host server name. Most sites use server names (like test-payflow.verisign.com for example) while some others use http based URL for processing (such as Authorize.NET and AccessPoint). The store will automatically pick a default URL based on the provider selection, but make sure you check your provider's SDK information to make sure the URLs have not changed. Some providers like PayFlow and LinkPoint don't use Host Urls so this value is not set.

Next provide a Merchant Id which is usually your account Id or user Id. Also provide the password for the account here. You can optionally specify a refering URL which is required for AccessPoint only - this is the URL you configure in AccessPoint's configuration.

To see what values need to be set please check the Credit Processing Classes topic and the individual class properties that need to be set for each provider.

Finally you can optionally specify a file path to a log file that logs every Credit Card transaction and its result. This file is a plain text file, and is optional - if you leave it blank no logging occurs. If you provide a path and file name make sure that the Web application can write to it (ie. the ASPNET or Network Service account) and that it's not in a path that is publicly accessible since this file contains partial CC numbers and names. The log file entries look like this:

7/11/2006 12:30:01 PM - Rick Strahl - 4115187729 - APPROVED - This transaction has been approved. - 1.00 7/11/2006 12:29:38 PM - Jim Holstein - 5181223634 - DECLINED - The credit card number is invalid. - 399.00

Processing Timeout
The timeout before a credit card processing request is considered to be timed out. This is sent to the HTTP or CC Processing interface and aborts the request which results in a FAILED request. Note that FAILED requests should always be double checked against the Gateway to ensure the request didn't actually make it through on the backend.

PayPal
The Web Store can work with PayPal classic which uses PayPal's HTML interface. One big advantage for using PayPal is that you can be up and running literally in minutes - all you need to do is sign up for a PayPal business account. As soon as you have an account email registered and verified your address and checking information you're ready to take money into this account. The process is not as smooth as Credit Card payments, but it works rather well and is the payment method of choice for many personal users as they don't have to give credit card information to the vendor.

PayPal Url
To activate PayPal operation check the PayPal checkbox at the top of the page and make sure that this URL is set. The standard PayPal Url is:

https://www.paypal.com/cgi-bin/webscr?

PayPal Business Email
This is the email address of your PayPal business account that will receive payments from customers.

PayPal Company Logo Url
You can optionally provide a Url to a small copy of your company logo. PayPal displays this image ontop of the PayPal payment page to provide some limited branding for your company. If you provide no image the standard PayPal logo shows up instead.

Application Configuration

Data Class Interface
This setting determines which backend is used to access the application. The default and only officially shipped interface for the Web Store is Sql Server and it's recommended that you stick with the SQL Server interface. However, if you feel up to it you can export the data to one of these other supported backends and run with the data using those providers.

Sql Server Connection String
This is the connection string you'll use to connect to SQL Server. For the sample we created previously the connection string is:

Server=(local);Database=MauiTouchWebStore;uid=UserId;Password=Password;enlist=false;Max Pool Size=5;

Error Display Mode
The option lets your application switch dynamically into different error display modes. While developing you'll likely want to use the ASP.Net default setting which displays detailed error information. When in application mode you can simply display a generic error message. Finally the detailed developer error message can be used when ASP.Net will not display detailed error info due to settings in Web.config. With this option you get most of the information that ASP.Net displays including the callstack, error message and if available the source code of an error.

Note: If Send Admin Emails is enabled all errors are logged and emailed regardless of which error mode you choose.

Log Errors
The store logs all errors that occur and it can do so in two separate places.

Enable Web Request Logging to Sql Server
When enabled causes the application to log every request to the store into a table in the database. This is useful for seeing what's going on in the store as well as giving you an application specific record of the application's hit that you can query and review in detail.

Note that request logging to SQL Server has some overhead as it involves an additional database hit for every single request in the store. Insertion is fast but it is an extra trip to the database. Also keep in mind that the log can get big quickly if you have a very busy site, so you want to make sure that you check the log occasionally and clear it out to reduce the size of the database.

UI Theme
The Web Store ships with several default themes that you can choose from for the look and feel. The Themes are based on ASP.NET Themes and a custom MasterPage templating mechanism that uses the formatting styles and templates that are located in the APP_THEMES and APP_TEMPLATES folders.

If you customize the store's visual overall display layout, you'll want to make sure you customize it for the appropriate Theme.

Settings Storage

All of these settings are also available in the web.config file under Westwind.WebStore section. We recommend you do not manually edit these setting there but use this page instead unless your server account does not have the ability to persist settings into web.config from the Configuration page.

web.config Persistence Requirements

Saving settings from the Configuration page to web.config requires that the Web server account has WRITE access to the web.config file. Typically this means NETWORK SERVICE or your ISP provided user account that runs the IIS Application Host. If this account does not have WRITE access settings will only be updated in memory and while it will appear to work right then, the settings will not persist when the Web server or the AppDomain are recycled

Settings can be changed either in web.config, the Configuration page or via the App.Configuration object.

App.Configuration Access

Programmatically these settings are driven through the WebStoreConfig object which is defined in the Westwind.WebStore.Business project. To add additional configuration values simply add properties to this 'globally' available static object and each of these properties is the automatically persisted into web.config (assuming that the server can write the file).

Any of these settings are always available in code through the App.Configuration object like this:

string conn = App.Configuration.ConnectionString; bool mode = App.Configuration.DemoMode;

And onwards to Step 3 - Setting up Inventory Categories.


 Last Updated: 1/12/2008 | Send topic feedback