Ektron CMS400.Net Reference
Ektron provides a complete set of eCommerce server controls that allow you to set up an online marketplace where site visitors can purchase merchandise, services or content. Site visitors interact with these server controls on your site to
select a currency
search for products or view a list of products
view a product's details and add it to their shopping cart
get recommendations on other products
view products in a shopping cart, create new carts, and apply discounts
check out
view a list of processed orders
view and change their account information
Most eCommerce server controls allow site visitors to move from one control to another via template properties that let you define the location of another server control. For example, if you define the path to the Cart server control in the Product server control’s TemplateCart property, site visitors are directed to the Cart control when they click the Product control's Add to Cart button.
Ektron CMS400.NET’s server controls let you insert standard methods and properties within the Visual Studio 2005 environment. This means that you can see the effect of your changes in real time -- you don’t have to modify a page then compile to see results.
You can insert server controls using drag and drop or programmatically. You can also use databinding to retrieve and display data from Ektron CMS400.NET. The following table shows typical actions a site visitor might perform when visiting your eCommerce site and how you can facilitate these actions.
Ektron provides a complete set of eCommerce server controls that allow you to set up an online marketplace where site visitors can purchase merchandise, services or content. Site visitors interact with these server controls on your site to the following:
To do this | See |
---|---|
Select the type of currency |
CurrencySelect Server Control |
Search for products or view a list of products |
ProductSearch Server Control and the Product List Server Control |
View the details of a product and add it to their shopping cart |
|
Get recommendations on other products |
|
View products in a shopping cart, create new carts, and apply discounts |
|
Go through the checkout process |
|
View a list of processed orders |
|
View and change account information |
The following table shows typical actions a site visitor might perform when visiting your eCommerce site and how you can facilitate these actions.
Site Visitor Action |
How you accomplish this |
When to Use |
View account information |
Create a link in the master page that leads to the template containing the MyAccount server control. |
This link should be available from any page. |
View previous and current orders |
Create a link in the master page that leads to the template containing the OrderList server control. |
This link should be available from any page. |
Change the currency type |
Add the CurrencySelect server control to a master page. |
This server control should be available from any page. |
Search for products |
Either create a link to the template containing the ProductSearch server control. - Or - On the master page, add a textbox that passes the text to a hidden ProductSearch server control and post the results to a separate template. |
This link or textbox should be available from any page. |
View a list of products |
Create a template that contains the ProductList server control. This template might be the first page site visitors see when they view the eCommerce portion of your site. |
Whenever you want to display a list of products based on a catalog, taxonomy or a list content IDs. For example, you could create a list of products in a panel on the right side of your Web site. |
View a product’s details |
Create a template that contains the Product server control. Set any of the following server control’s TemplateProduct property to the path of this control. This makes a product’s title being displayed by one of these controls a clickable link that takes the site visitor to this control. ProductSearch ProductList OrderList Cart Recommendation |
When ever a site visitor needs to view details of a product. |
View additional products associated with another product |
Add the Recommendation server control to a template that contains a Product server control and set the Recommendation control’s DynamicProductParameter property to the QueryString parameter that’s used to pass a products ID. |
When ever you want to present a site visitor with cross-sell and upsell opportunities associated with a given product. |
Add a product to their shopping cart |
Set the TemplateCart property in the following server controls to the path of the Cart server control. Setting this property is one of the requirements for the Add to Cart button or link to appear in these controls. ProductSearch ProductList Product Recommendation Note: In addition to setting the above property, a product must be in-stock, not archived and buyable. Otherwise, the Add to Cart button or link does not show for a product. |
When you want to allow site visitors to add products to their shopping cart. |
View products in their shopping cart |
When a site visitor adds a product to their cart, they are sent to the Cart server control. You should also create a link in the master page that leads to a template containing this control. |
The link should be available from any page. |
Checking out and paying for their selected product. |
Add the Checkout server control to a template and add that template’s path to the Cart server control’s TemplateCheckout property. When you do, the Checkout button in the Cart server control becomes active. |
You must set this up in order for site visitors to checkout. |
The eCommerce server controls contain event hooks that allow you to customize or manipulate them.
To use these event hooks, create a handler for each needed event in the code behind of the ASPX page that contains an eCommerce server control. Then, in that page’s OnInit method, hook each event.
For the Checkout server control:
[Site Root]/Developer/Commerce/CheckoutDemo_Advanced.aspx
[Site Root]/Developer/Commerce/CheckoutDemo_Advanced.aspx.cs
For the Cart server control:
[Site Root]/Developer/Commerce/CartDemo_Advanced.aspx
[Site Root]/Developer/Commerce/CartDemo_Advanced.aspx.cs
For the Product server control:
[Site Root]/Developer/Commerce/ProductDemo_Advanced.aspx
[Site Root]/Developer/Commerce/ProductDemo_Advanced.aspx.cs
Event |
This Hook is Called... |
Description |
PhaseChange (Used only in the Checkout server control.) |
when the current phase is about to change. |
Supervise phase changes and allow or prevent changing as needed. It also allows you to jump to a specified phase. For example, you could jump to a passed phase, prevent the phase from changing from the current one under certain conditions, or jump to a phase that is not necessarily the next one in line. |
PreProcessXml |
immediately before the control’s XML is transformed. |
Inspect or manipulate the server control’s XML before being processed. This is the only time the XmlDoc property should be used to access the controls XML. |
PostProcessXml |
immediately after the control’s XML is transformed. |
Work with processed transformed XML output inside the Text property before sending it to the browser. This allows simple string manipulation of the server control’s markup. |
FilterAjaxCallback |
when an Ajax-Callback event occurs. |
Inspect or modify callback parameters. For example, you could use this event to receive custom values entered in a page. |
PostLogin (Used only in the Checkout server control.) |
immediately after a (possibly new) user logs in with this control |
Calls custom code immediately after a returning user logs in with his email and password. Or, immediately after a new customer fills out the billing info screen. For example, you could add code that allows new customers to sign up for Web Alerts after they add their information to the billing screen. |
When using the EkItems property with eCommerce server controls it can only be used with the Product and ProductList server controls. This property gets EntryData for a product and can only be called during the PreProcessXml or PostProcessXml event. If you use it outside of these events, it will return empty values for the entry data.