MyAccount Server Control

The MyAccount server control lets logged-in customers (site visitors) view and edit their Personal Information, Billing Address and Shipping Address.

If the customer is not logged in and arrives at this control, one of the following happens:

Typically, the information displayed in this control is collected the first time a customer goes through the checkout process. A customer’s information might appear in the Personal Information area before they have been through the checkout process if they are a current Ektron user or registered membership user.

If a logged-in customer arrives at this server control and is missing required information, it must be entered before continuing. For example, a customer needs to provide his Last Name or E-mail Address.

As a developer, you need to create a link to this control in a site location that appears only after log in. For example, you might place the link on a menu or on a master page that appears after a customer logs in.

Flow of MyAccount server control

Flow of the MyAccount Server Control

A customer typically arrives at this control by clicking a link placed on a main page, master page, or menu. The following figure shows the flow of the MyAccount server control.

Editing personal information

Editing Personal Information

The Personal Information area lets customers view and edit some information contained in their profile. By default, a customer can edit their First Name, Last Name, email Address, and Password. By adding a list of Custom User Property IDs to the CustomPropertyID property, you can let customers view and edit custom properties in their profile. See Also: Custom User Properties.

A customer can change the information in the Personal Information area by clicking Edit in the lower left corner of this area. The resulting page allows him to change any information in this area. When done, the customer clicks Save Changes to save the changes and return to the My Account page.

Editing a billing address

Editing a Billing Address

The Billing Address area lets customers view and edit their billing address information. A customer can edit their Name, Company, Address, City, State, Postal Code, Country, and Phone number. This information is used for billing purposes when the customer makes a purchase. Credit card companies typically want part or all of this information to match a customer’s credit card account information when making a purchase.

To edit a customer’s billing address, click Edit in the lower left corner of the Billing Address area.The resulting page allows him to change any information in this area. When done, a customer clicks Save Changes to save the changes and return to the My Account page.

Editing a shipping address

Editing a Shipping Address

The Shipping Address area lets customers view, edit, delete or add a new address to their shipping address information. The fields in this area are the same as those in the Billing Address area with 2 exceptions: a Same as Billing check box, and a Default Address check box. The Same as Billing Address check box lets customers place a check mark in the box and use their billing address information as their shipping address. The Default Address check box lets customers specify the current shipping address as the default they want to use when making future purchases.

To edit a customer’s shipping address, click Edit in the lower left corner of the Shipping Address area. The resulting page allows him to change any information in this area. Note that a customer must uncheck Same as Billing to be able to edit the shipping address. Otherwise, it is locked to the billing address. When done, a customers clicks Save Changes to save the changes and return to the My Account page.

Adding a new shipping address

Adding a New Shipping Address

To add a new shipping address, the customer clicks Add New Address located in the bottom center of the Shipping Address area.The resulting page allows him to enter new shipping address information. Note that the Same as Billing checkbox is not available when adding a new address. When done, a customer clicks Save Changes to save the changes and return to the My Account page.

Deleting a shipping address

Deleting a Shipping Address

To delete a shipping address, the customer clicks Delete Address at the bottom of the Shipping Address area. The visitor is asked to confirm. If the customer does and there are no other shipping addresses, the billing address is used as the shipping address. If the shipping address is the same as the billing address, you cannot delete it.

MyAccount server control properties

MyAccount Server Control Properties

The following are Ektron-specific server control properties. You can find information about native .NET properties such as font, height, width and border style in Visual Studio® help.

  • Authenticated (String)

    Indicates if you are logged into the CMS Explorer and can use it to browse to content, collections, and so on. See Also: Browsing Your Ektron Site Using CMS Explorer.

  • CacheInterval (Double)

    The number of seconds that the server control’s data is cached. The default is 0 (zero). For example, if you want to cache the data for 5 minutes, set to 300. See Also: Caching with Server Controls.

  • CustomerPropertyID (String)

    An ID or comma separated list of IDs for a Custom User Property (or properties) to expose in the UI. These properties are used to define information about a user beyond the standard Ektron user properties; such as Username, First Name, Password and email Address. See Also: Editing Personal Information.

    IDs for these properties can be found in the Workarea > Settings > Configuration > Custom Properties screen. See Also: Custom User Properties.

  • CustomXml (Code-behind Only) (String)

    Lets you inject custom XML into the generated XML before being processed by the XSLT. Enter a string of XML that you want to make available to the XSLT as follows:

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

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

  • DefaultCountryID (Integer)

    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 customer is from a different country, the customer can it change when editing the Billing or Shipping Address.

    NOTE: If a customer enters information in the Billing Address area, his Billing Country seeds the Shipping Country when adding a new Shipping Address.

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

  • DisplayXslt (String)

    If desired, enter a relative or absolute path to an Xslt that determines the display of the page. By default, the control uses MyAccount.xsl. This file is located in siteroot\Workarea\Xslt\Commerce

    IMPORTANT: If you specify an external file, do not store this file in the Workarea folder. If you store this file in the Workarea folder, the file will be lost when you upgrade.

  • DoInitFill (Boolean)

    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 code-behind and have it render with your changes shown.

  • Hide (Boolean)

    Hides or displays the output of the control in design time and run time.

    • True—Hide the control output.
    • False—Display the control output.
  • Language (Integer)

    Set a language for viewing content; shows results in design-time (in Visual Studio) and at run-time (in a browser).

  • LoadingImage (String)

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

  • RedirectUrl (String)

    Enter the path of a template that contains the Login server control. When a customer arrives at this control and is not logged in, the control checks this property for a path to template containing a Login server control. If one exists, the customer is sent to that template. When the customer logs in, the template containing the MyAccount server control appears. If no path exists, the control checks the web.config file’s <addkey=ek_RedirectToLoginURLvalue=””/> value for a path.

  • Stylesheet (String)

    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.

  • SuppressWrapperTags (Boolean)

    Suppresses the output of the span/div tags around the control.

    • True—Suppress wrap tags.
    • False (default)—Allow wrap tags.