Ektron CMS400.Net Reference

>>Conducting eCommerce with Ektron CMS400.NET > Checkout Server Control

Checkout Server Control

Important: When using the Checkout server control, you should always have an SSL certificate installed for your Web site and set the control’s IsSSLRequired property to True. This protects your customers’ payment information while it is being transmitted. Do not use a self-signed SSL certificate -- obtain one from a trusted certificate authority.

The Checkout server control allows a site visitor to navigate through the checkout process. This process includes:

adding billing and shipping information

selecting a shipping method

reviewing the order

submitting the order and credit card information

notification that checkout process is complete

Site visitors typically arrive at this server control by clicking Checkout on the Cart server control. They also might reach this server control from a Checkout link you create on your site.

The control provides a navigational aid that indicates the customer’s step in the checkout process. At any point, the customer can move forward to the next step or back to a previous one.

As appropriate, some steps do not appear. For example, if merchandise is not tangible, the shipping screen does not appear.

Logging In or Setting Up an Account

The login portion of the Checkout server control accommodates these types of customers.

existing customers

customers who have not logged in before but who wish to create an account

customers who wish to make one-time only purchase and not set up an account

Existing Customers' Login

If an existing customer is not logged in when he reaches this server control, it prompts him to log in. Optionally, this screen could have a link that allows an existing user to recover his password. To enable this link, add a template path to the control's TemplateRecoverPassword property.

After a site visitor who previously purchased from this site logs in, billing and shipping information are retrieved and appear by default. The visitor can review and edit this information. However, Ektron CMS400.NET does not store credit card numbers, so that information must be entered each time.

Customer's First Time Login

If a site visitor has not purchased from your site before and wants to set up an account, he clicks Create Profile and Checkout. On the new screen, he enters billing information including a password.

After completing that screen, a membership user account is created, and he is logged in. The new user can then proceed through the checkout. The next time this visitor logs in, he is treated as an existing customer.

Guest Account Registration

The Checkout server control also provides a guest checkout feature (circled below) for site visitors who don't want to set up an account on your site. To enable this feature, set the AllowGuestcheckout property of the Checkout server control to true.

If a user clicks Checkout Without Profile, he proceeds to a version of the billing screen that version does not ask for a password. The rest of the checkout is exactly the same.

Although the customer can proceed through the checkout like other customers, if he wants to checkout again in the future, he must re-enter all billing and shipping information.

Site visitors who use the guest checkout feature can view their orders using the Order List server control if its GuestOrderView property is set to true. See Also: OrderList Server Control

Checkout Server Control Screens

The Checkout server control is broken up into several sections. Each section represents a portion of the checkout process.

Billing Information

Shipping Information

Shipping Method

Review Order

Submit Order

Order Complete

Billing Information

This section prompts site visitors to enter or update billing information, including:

Name

Company (Optional)

Street Address, City, State, Postal Code, Country

Note: If a site visitor chooses a country other than the United States, no field validation is applied to the postal code by default. To apply country-specific postal code validation, see this Ektron Knowledge Base article:http://dev.ektron.com/kb_article.aspx?id=26072 .

Phone

email address (appears when a visitor is creating a new account or doing a guest checkout)

Password (appears when a visitor is creating a new account or doing a guest checkout)

Shipping Information

This page allows site visitors to add or edit shipping information. By default, it uses the billing address as the shipping address. From this screen, site visitors can

add new addresses

edit existing addresses

if more than one address is entered, pick address for current order

proceed to the next step or back to the previous page

When a logged-in site visitor adds a new address, it’s stored with the account information in Ektron CMS400.NET.

Shipping Method

This page allows site visitors to select the type of shipping for their products. Shipping methods that appear here are defined in the Workarea > Settings > Commerce > Shipping > Methods. For information on setting up shipping methods, see Shipping Methods.

Review Order

The Review Order page displays information about the products being purchased, their price, shipping charges, discounts, and taxes. At this point, if a site visitors wants to modify their cart, they click Edit your cart. For example, a site visitor wants to apply a coupon to his cart.

For this link to work properly, you need to add the path to the template that contains the Cart server control to the Checkout server control’s TemplateCart property.

Submit Order

On the Submit Order page, a site visitor enter payment information. He can pay by check, credit card, or PayPal, depending on what has been set up in your Ektron CMS400.NET Workarea’s eCommerce > Configuration > Payment Options screen.

Once a site visitor enters the information, he clicks Submit. At that point, the charge is submitted to the payment gateway, and the order is posted in Ektron CMS400.NET. See Also: Orders

Order Complete

This page displays a Thank You note, the order ID, and links to continue shopping or view an order’s history.

The Continue Shopping link appears when you add the path of a template that allows a site visitor to find products to the TemplateShopping property. For example, you might send them to a template containing a ProductSearch or ProductList server control.

The Order History link appears when you add the path of a template containing the OrderList server control to the TemplateOrderHistory property.

Flow of the Checkout Server Control

Below is a flow chart that represents the options & processes in the Checkout Server Control.

Checkout Server Control Properties

The following table explains the properties of the Checkout control.

Note: The following table only lists Ektron-specific properties. It does not describe native .NET properties such as font, height, width and border style. For documentation of these properties, see Visual Studio help.

Property

Description

Data Type

Authenticated

Indicates if you are logged in to the CMS Explorer and can use it to browse to Content, Collections, etc.
See Also: Working with Ektron CMS400.NET Server Controls

String

CacheInterval

Sets the amount of time the server control’s data is cached. The default is 0 (zero). This is the amount of time, in seconds, a control’s data is cached. For example, if you want to cache the data for five minutes, set the CacheInterval property to 300 (three hundred).
See Also: Caching with Server Controls

Double

CurrentPhase

(Code Behind Only)

Reports or selects the current page (or phase) of the checkout control. This allows you to customize the flow of the control. For example, if you only have one shipping option, you would skip the ShippingInfoEntry phase.

For an example of working with the CurrentPhase property in code behind, download Ektron’s Developer Sample Site and view these files.
[Site Root]/Developer/Commerce
/CheckoutDemo_Advanced.aspx

[Site Root]/Developer/Commerce
/CheckoutDemo_Advanced.aspx.cs

Phases are listed below in the order which they happen within the control.

Login - allows existing users to log in. See Also: Logging In or Setting Up an Account.

BillingInfo - displays a site visitor’s billing information. See Also: Billing Information

BillingInfoEntry - allows entry of a site visitor’s billing information. See Also: Billing Information.

ShippingInfo - allows entry of a site visitor’s shipping information.

ShippingInfoEntry - pallows entry of a site visitor’s shipping information. See Also: Shipping Information.

ShippingMethodSelect - allows selection of the method of shipping. See Also: Shipping Method.

ReviewOrder - displays the current order’s details for review. See Also: Review Order.

SubmitOrder - lets site visitors add payment information. See Also: Submit Order.

Complete - displays completion message. See Also: Order Complete.

Error_EmptyBasket - used when a cart has no items and the site visitor somehow enters the control.

Error_UnhandledException - occurs when there’s an error that the control cannot resolve.

ControlPhase

CustomXml

(Code Behind Only)

Enter a string of XML that you want to make available to the XSLT. This property provides a mechanism to inject custom XML into the generated XML before being processed by the XSLT. The sting is added inside the CustomXml tag as follows:

<root><customXml>custom-xml-inserted-here</customXml></root>

See Also: Displaying Custom XML in Ektron’s Server Controls

String

DefaultCountryId

The ID of the default country that appears in the Billing Address and Shipping Address. Set this ID to the country from which the majority of your customers will be making purchases. If the site visitor is from a different country, he can change it when editing the Billing or Shipping Address.

To find a country’s numeric ID, sign into the Ektron CMS400.NET Workarea. Then go to Settings > Commerce > Configuration > Countries. The Numeric ID is in the left column of that screen.

Integer

 

DoInitFill

By default, Fill occurs during the Page_Init event. Set to false if you want to postpone the fill-action until later. In this case, FIll is automatically called during the Page Render event.

You might do this if you need to set or change a property on the control in codebehind and have it render with your changes shown.

Boolean

DynamicPhaseParameter

The name of the parameter on the QueryString that identifies desired phase ID.

String

DisplayXslt

Specify an external XSLT file to render the control. By default, the control uses Checkout.xsl. This file is located in
<SiteRoot>\Workarea\Xslt\Commerce
\Checkout\Standard

Important: If you want to edit this file, it is strongly recommended that you make a copy, change its name and move it outside your site’s Workarea folder. If you make changes to this file and do not move it out of the Workarea folder, this file and the changes will be lost when you upgrade.

String

FriendlyErrorMessage

The message that is shown to a site visitor when an unhandled error occurs. Details are sent to the event log. The default message is
We're sorry, an error occurred while processing your request. Please try again later...

String

AllowGuestCheckout Set to true if you wish to allow the Guest Checkout feature. See Also: Guest Account Registration Boolean

Hide

Used to hide the control in design time and run time.

True = Hide the control

False = Show the control

Boolean

IsSSLRequired

When set to True, switches to an SSL encrypted URL. For the SSL encryption to work, you must have an SSL certificate installed for your site. See Also: Configuring SSL

Information on SSL can be found at the following Web sites.

http://www.tech-faq.com/understanding-ssl.shtml

http://www.verisign.com/ssl/ssl-information-center/how-ssl-security-works/index.html

Installing and using an SSL is one of the most important things you can do to protect your customer’s credit card data.

Note: Ektron, Inc. is not associated with TechFAQ or VeriSign. However, both sites offer good explanations of Secure Sockets Layer.

Boolean

Language

Set a language for viewing the checkout control. This property shows results in design-time (in Visual Studio) and at run-time (in a browser).

Integer

LoadingImage

The image to display while the control is fetching data. The default is <siteroot>\Workarea\images
\application\ajax-loader_circle_lg.gif.

String

Stylesheet

Specify the path to a style sheet for use with this server control. The location can be relative or absolute. Leave blank to use the default style sheet.

String

SuppressWrapperTag

Suppresses the output of the span/div tags around the control. The default is False.

True - Suppress wrap tags.

False - Allow wrap tags.

Boolean

TemplateCart

The URL path of the template that contains the Cart server control. This path can be relative or absolute.

When a path is entered, a link appears in the Review Order part of the process that allows a user to navigate to the template containing the Cart server control. See Also: Review Order and Cart Server Control.

String

TemplateOrderHistory

The URL path of the template that contains the OrderList server control. This path can be relative or absolute.

When a path is entered, a link appears at the end of checkout process that allows a user to navigate to the template containing the OrderList server control. See Also: Order Complete and OrderList Server Control.

String

TemplateRecoverPassword

The URL path of the template that helps site visitors recover their password. This path can be relative or absolute.

When a path is entered and a site visitor has not logged in, a link appears at the beginning of checkout process that allows him to navigate to a template containing information to recover his password. The Membership server control contains an option for recovering passwords. See Also: Logging In or Setting Up an Account and Membership Server Control

String

TemplateShopping

The URL path of the template that allows the site visitor to continue shopping.

If a path is entered, a link appears at the end of checkout process that allows a user to navigate to a template that letys him continue shopping; for example, the template containing a ProductList or ProductSearch server control. See Also: Order Complete, Product List Server Control and ProductSearch Server Control

String


Visit the Ektron Dev Center at http://dev.ektron.com 1-866 - 4 - EKTRON

Ektron CMS400.NET Reference Version 8.02 SP1 Rev 1

Ektron Documentation,© 2011 Ektron, Inc.