Using the eCommerce Server Controls
Ektron provides a complete set of eCommerce server controls that let you set up an online marketplace where customers (site visitors) can purchase merchandise, services or content. Customers interact with these server controls on your site to:
Most eCommerce server controls let customers 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, customers are directed to the Cart control when they click the Product control's Add to Cart button.
Ektron’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 and 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.
Ektron provides a complete set of eCommerce server controls that let you set up an online marketplace where customers can purchase merchandise, services or content. Customers interact with these server controls on your site to perform the the following tasks:
The following table shows typical actions a customer might perform when visiting your eCommerce site and how you can facilitate these actions.
Customer 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 |
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 |
This link should be available from any page. |
Change the currency type |
Add the |
This server control should be available from any page. |
Search for products |
Either create a link to the template containing the - Or - On the master page, add a textbox that passes the text to a hidden |
This link or textbox should be available from any page. |
View a list of products |
Create a template that contains the |
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
|
When ever a customer needs to view details of a product. |
View additional products associated with another product |
Add the |
When ever you want to present a customer with cross-sell and upsell opportunities associated with a given product. |
Add a product to their shopping cart |
Set the
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 customers to add products to their shopping cart. |
View products in their shopping cart |
When a customer adds a product to their cart, they are sent to the |
The link should be available from any page. |
Checking out and paying for their selected product. |
Add the |
You must set this up for customers to checkout. |
The eCommerce server controls contain event hooks that let you 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.
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 lets you 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. |
You can use the EkItems property only with the Product
and ProductList
eCommerce server controls. This property gets EntryData for a product and can only be called during the PreProcessXml or PostProcessXml event. If used outside of these events, it returns empty values for the entry data.