Guest-related settings in detail
There are several application settings in the site config file via the Site Admin panel, that dictate how guest records are handled during guest lookup and display. These include (only edit the portion between the double-quotes that follows value=):
Site Admin Panel > Guest Related Settings > LookupChars value = 2
Site Admin Panel > Guest Related Settings > UseEmailUserID value = 0
Site Admin Panel > Guest Related Settings > InfoExpr value = SUBSTRING(phone, 7, 2)
Site Admin Panel > Guest Related Settings > InfoHeading value = Last two digits of phone#
Site Admin Panel > Guest Related Settings > VerifyField value = passwords
Site Admin Panel > Guest Related Settings > VerifyPrompt value = Password:
Site Admin Panel > Guest Related Settings > 1PWEmail value = 1
Site Admin Panel > Guest Related Settings > GuestEditRows value = guest_no, first_name, last_name, address, address2, city, state, zipcode, country, phone, email, birth_date, contact, password"
Site Admin Panel > Guest Related Settings > GuestDispRows value = guest_no, first_name, last_name, address, address2, city, state, zipcode, country, phone, email, birth_date
Site Admin Panel > Guest Related Settings > ExistingGuestHideRows value = "birth_date"
Site Admin Panel > Guest Related Settings > ForceEditFields value = "first_name, last_name, address, city, state, zip, country, area_code, phone, birth_date, email"
Site Admin Panel > Guest Related Settings > GuestPhotos value = 1
Site Admin Panel > Guest Related Settings > DefAddress value = 1
Site Admin Panel > Checkout Settings > AllowStoredCards value = 1
Site Admin Panel > Guest Related Settings > UseSameConfirm value = 1
Site Admin Panel > Guest Related Settings > UseSameConfText value = You have chosen to use the same guest ({{guest_name}}) again.\nAre you sure?
Site Admin Panel > Guest Related Settings > NoUseSame value = 0
Site Admin Panel > Guest Related Settings > NoPurchTracking value = 0
Site Admin Panel > Guest Related Settings > TransLookups value = 1
Site Admin Panel > Guest Related Settings > TransLookupFile value = 0
Site Admin Panel > Guest Related Settings > TransEdits value = 1
Site Admin Panel > Guest Related Settings > TransEditFile value = 0
Site Admin Panel > Guest Related Settings > TransEditFields value = first_name, last_name, address
When performing a guest lookup via the Guest Lookup link or by way of attaching a guest to an item such as a pass, the minimum number of characters that must be entered into each name field (First Name and Last Name) is defined using the LookupChars key. Normally this is set to a value of 2 so that names such as “Al” or “Ed” can be looked up.
You can enable use of a guest’s e-mail address instead of first and last name for guest lookup by setting the UseEmailUserID to 1. The label for the lookup field is changed directly in GuestLookup.aspx by modifying the value of the lblFirstName label to reflect the field you are using for lookups (i.e., First Name or Email). When Site Admin Panel > Guest Related Settings > UseEmailUserID > value = 1, the web log-on name field on GuestEdit.aspx auto populates with the e-mail address entered on the Guestedit.aspx page when creating a new guest to make it easier for people to use their e-mail address as a log-in ID.
If there are multiple matches from a guest lookup, the InfoExpr key is used to help visitors/guests identify themselves by displaying additional information from the guest records involved. The value for this key can contain any valid VB.NET/ADO.NET expression including a field (or fields) from the address table.
Examples:
Values for this field include SUBSTRING(phone, 7, 2), which returns the last two digits of the guest phone number, zip, which returns the guest zip code, and zip+' - '+SUBSTRING(phone, 5, 4), which returns the guest zip code and last four digits of the guest phone number separated by a - .
When there are multiple guest lookup matches to display, the guest names and information returned from the InfoExpr key are displayed in two columns. The heading for the InfoExpr column is set using the InfoHeading key. The value for this key can contain any text you choose.
Once a single guest is identified in the guest lookup process, the guest must enter an additional piece of information as verification of his identity. This is controlled using the VerifyField key, which can contain any field name from the guests table. The key VerifyPrompt displays text prompting the guest for the additional piece of information.
If you are using the value passwords for the VerifyField key, then the following keys come into play: the 1PWEmail site config setting, which is used to enable (1) or disable (0) one e-mail password resetting and the <RegEx> tag in the dynamicControls.xml file, which is the regular expression for validating the user-supplied password. Please see below for a more detailed discussion on configuring guest verification using web passwords.
The display of guest fields in the GuestSelected and GuestEdit pages is controlled by three keys: GuestEditRows, GuestDispRows and ExistingGuestHideRows. In addition, the dynamicControls.xml file can be used to help configure guest information, as described in the Salesware E-Commerce Reference. The values entered for GuestDispRows are the guest and address on table rows that are displayed on GuestSelected.aspx when a guest is looked up, while the values entered for GuestEditRows are the guest and address table rows displayed on GuestEdit.aspx when a guest is edited. ExistingGuestHideRows are any of the Guest Edit rows that you want hidden for existing guests but available to new guests. Available values for GuestDispRows, GuestEditRows, and ExisitngGuestHideRows are: guest_no, first_name, last_name, firstname2, lastname2, company, address, address2, city, state, zipcode, country, phone, ext, phone2, ext2, fax_phone, ext3, email, username, password, contact, cardonfile, parent, children, group, notes, birth_date, gender, height, weight, shoesize, type_skier, stance, cb1, cb2, cb3, numbers1, numbers2, text1, text2, text3, memo_1, memo_2, memo_3, date_1, datetime_1, ltext_1, ltext_2, ltext_3, ltext_4, ltext_5, tix, last_pass, misc1, misc2, misc3, misc4, misc5. Some of these choices are self-explanatory while others require an explanation.
The cardonfile setting is included when you want to allow guests to be able to see if they have an existing credit card in their guest record, update their guest record with new credit card data, or add credit card information to a new guest record. This can work in conjunction with the key AllowStoredCards described below. The contact setting corresponds to the three check boxes: It's OK to mail me, It's OK to call me and It's OK to e-mail me. The group and notes settings correspond to the Group field on the Group Info tab and the Notes field on the Notes, Security tab on the Guest Edit Form in SysManager.
The cb1, cb2, cb3, numbers1, numbers2, text1, text2, text3, memo_1, memo_2, memo_3, date_1, datetime_1, ltext_1, ltext_2, ltext_3, ltext_4 and ltext_5 values correspond to the user defined check boxes, numbers, text, memo, date and long text fields on the User Def 1 and User Def 2 tabs on the Guest Edit Form in SysManager.
The ForceEditFields key is a list of guest or address fields that stop a visitor/guest from continuing if he is incomplete in the database after a successful lookup. Fields which can be in this key include first_name, last_name, address, city, state, zip, country, area_code, phone, passwords, birth_date and e_mail. If the ForceEditFields key is empty or not present in the site config file for the pages, then, empty fields in the guest record do not force them to edit their record from the GuestSelected.aspx page.
tix is used with GuestDispRows to enable a visitor/guest to download his Print At Home Tickets items simply by logging in.
stance is used display Stance on the GuestSelected.aspx page.
Note: It is important that you consider the fields you include in ForceEditFields and in the GuestEditRows and ExisitingGuestHideRows settings. You do not include a field in the ForceEditFields key if you also have it in the ExisitingGuestHideRows key or it is not listed in the GuestEditRows key or an error occurs. Under either of these conditions it would be impossible for an existing visitor/guest to update the field in his record, so be careful how these three site config settings are configured.
The display of an existing guest photo that is part of a guest record is controlled by the GuestPhotos key. Setting the value to 1 displays the photo if the guest has one on file. To turn off this feature, the value for this key is set to 0. This can come in handy for cases where limited bandwidth exists between the pages and the web service (wwService)/ww.dll computer.
The DefAddress key does two things:
1. It helps to filter the list of guests during a guest lookup – only those guests with the address type defined by the DefAddress setting are looked at.
2. It defines the default address type used by the pages when displaying and saving a guest address. The values possible for this key and their corresponding address types are as follows: 1=Mailing, 10=Shipping, 20=Billing, 30=Local.
If you want to allow visitors/guests to be able to use a credit card they have stored on file in their guest record for payment on your web site or to be able to update their guest record with the credit card they use for payment on the web sale, set the value of the AllowStoredCards key to 1. This activates two new check boxes: one to charge the sale to the card on file in the paying guest’s record (if valid) and one to save the card being used for payment of the current sale to the guest record of the paying guest.
When attaching a guest to an item, you have a couple of options for how the Use Same Guest button on the GuestLookup.aspx page acts. You can have a pop-up message display that can be worded to verify that the web shopper really wants to add the same guest to the item when this button is used or you can disable the button altogether.
The UseSameConfirm key is used to enable or disable the display of the pop-up message window – set to 1 to enable or set to 0 to disable. The value for the key UseSameConfText sets the wording for the popup message.
Example:
Site Admin Panel > Guest Related Settings > UseSameConfText > value = WARNING!!\nYou have chosen to use the same guest ({{guest_name}}) again.\nAre you sure? displays that message in a pop-up window with the guest name appearing where {{guest_name}} is in the message. The \n is used to insert a line break into the message. If you want to incorporate an apostrophe into the message text you need to enter them as \'.
If you want to make it so that the Use Same Guest button does not even appear on the GuestLookup.aspx page, you add the following setting to your site config file: Site Admin Panel > Guest Related Settings > NoUseSame > value = 1. If this is set to 0, the Use Same Guest button appears as it always has.
Normally the person who is the online purchaser is either an existing guest in the database or he needs to create himself as a guest in the database. If you want you can configure this so that the online purchaser does not need to be a guest in the database or create a new guest record. This is accomplished by setting the value for the key NoPurchTracking to 1. Setting the value for this key to 0 or not including this setting in the site config file maintains the behavior of requiring a guest record in the database for the web purchaser. With the value for this key set to 1, the fields on the Checkout.aspx page become form entry fields that the web purchaser simply fills-in. By default, most of these fields are set as required, but they can be configured to not be required.
Even with this key set to “1”, the purchaser information is still stored in the Sale string, ww_Sales.Sale_text. Once the sale is processed by the Sales Host, the information gets written into the salenote.Notes2 field in this format:
<save><first_name>Tom</first_name><last_name>Thumb</last_name><phone>(555) 555-5555</phone><address>1234 5th Street</address><address2>Apt 367</address2><city>Albuqurque</city><state>NM</state><zip>88888</zip><country>USA</country><email>testers@diriusware.com</email></save>
It is possible to designate characters to substitute for other characters entered during a guest lookup or a guest edit using the web pages. This can be useful when visitors/guests are looking themselves up or editing their guest records when using a foreign keyboard and you want to keep the characters in your database consistent.
There are several settings that control how this works along with one or more XML files where the character substitutions are designated. The keys TransLookups and TransEdits enable or disable character substitutions during guest lookups or edits, respectively. The TransLookupFile and TransEditFile keys allow you to specify a different file (numbered like StrTrans3.xml) to be used for guest lookups or edits, respectively. The value entered for the TransEditFields key lets you specify the various database fields from the guests and/or address tables that you allow guests to access on the GuestEdit.aspx page and where you want character substitutions to occur. If the value for TransEditFields is empty, the default is first_name, last_name from the guests table.
You are provided with an initial XML file named StrTrans0.xml. This file is located in the XMLFiles folder, which is in the same directory where your pages are located (typically C:\Inetpub\wwwroot\E-Commerce). If you want to use a different file for guest lookups than for guest edits, you can copy StrTrans0.xml and rename it to StrTrans1.xml for example (the general format for naming the StrTrans files is StrTransn.xml where n is a whole number). You would need to change the value for either TransLookupFile or TransEditFile to 1 in order to use StrTrans1.xml. Each of the StrTransn.xml files that you create must be located in the XMLFiles folder.
To set up character substitutions, you need to edit the following part of the StrTrans.xml file, where <oldStr>é</oldStr> contains the character that an online visitor/guest has entered and <newStr>e</newStr> contains the character you want to substitute for é when it is either read from or written into the database:
<StrTrans>
<oldStr>é</oldStr>
<newStr>e</newStr>
</StrTrans>
<StrTrans>
<oldStr>É</oldStr>
<newStr>E</newStr>
</StrTrans>
You can add additional characters in the same format used above with each character added requiring its own section like this:
<StrTrans>
<oldStr>è</oldStr>
<newStr>e</newStr>
</StrTrans>