CyberStore Ecommerce 2023 Documentation
CustomerAccount3Control Class
Members 


Dovetail.Ecommerce.Controls Namespace : CustomerAccount3Control Class

Step three of the registration process.

Remarks

The CustomerAccount3Control provides the on file shopper with a non-editable list of available addresses from SYSPRO and the B2C shopper with an editable address. It saves the registration, shipping, and billing information to the database.

An example of the CusomerAccount3Control in use is below:

 

Property Usage

By changing the values of the control's properties in the SitePages.config file for your Site, you can enable or disable certain behaviors, set certain defaults, alter aspects of the display or otherwise cusomtize your site's implementaion of the control.

The following describes properties pertaining to key functional areas of the control that can be configured to suit your needs.

Text Properties

There are two text properties which can be customized to display unique texts for the multi ship hint text and the multi ship test which are the MultiShipHintText and the MultiShipText repectively.

Display Properties

The ShowMultiShipAddress1 gets or sets a value indicating whether the multi ship address 1 is shown.

The ShowMultiShipAddress2 gets or sets a value indicating whether the multi ship address 2 is shown.

The ShowMultiShipAddress3 gets or sets a value indicating whether the multi ship address 3 is shown.

The ShowMultiShipAddressCode gets or sets a value indicating whether the multi ship address code is shown.

The ShowMultiShipCity gets or sets a value indicating whether the multi ship city is shown.

The ShowMultiShipCountry gets or sets a value indicating whether the multi ship country is shown.

The ShowMultiShipShipToName gets or sets a value indicating whether the multi ship to name is shown.

The ShowMultiShipState gets or sets a value indicating whether the multi ship state is shown.

The ShowMultiShipZip gets or sets a value indicating whether the multi ship zip is shown.

Properties Inherited from the Base CyberStoreBaseControl

Properties specific to the CyberStoreBaseControl can be listed in the following categories:

Override Properties

When the IgnoreControl property is set to true, all processing of a control is skipped, and the control's Visible property is set to false ensuring that it is not rendered in the resulting CyberStore page.

Contextual Properties

Contextual properties define specific details about the current instance of the control based on context. Context can be set by any number of factors including the log in state of the Shopper, the Site being visited, or the properties that have been established for a control.

The AttributesBag property is used internal to control processing and is the collection of attributes, or properties, and their values based on how the control is configured. The attributes in this property are set by processing the SitePages.config file as well as any specific declared property values in any registered sub controls. It allows for the passing down of all properties to a control and any registered sub controls.

The ComConfigUserData and Site_ID properties are read-only values made available to all CyberStore controls to aid in processing and establishing context about the Site and Shopper.

Sub Controls

The table below lists and describes sub controls used by the default CustomerAccount3Control.

Sub Control Description
CommonStateDropDownControl Displays a list of available states in a drop-down.
Control Markup

The following is the markup for this control.

Developer's Note:

To create a custom version of the control, copy all of the code below into a file of the same name and place it into your Site's control folder (e.g., ../YourSiteFolder/Control). The CyberStore page engine will then override the default markup with your customized version.

 

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CustomerAccount3Control.ascx.cs"
    Inherits="Dovetail.Ecommerce.Controls.CustomerAccount3Control" EnableViewState="true" %>
<@ Register TagPrefix="uc1" TagName="CommonStateDropDownControl" Src="~/Control/CommonStateDropDownControl.ascx" >
<script>
    function OnMultiAddressRow(selectedValues) {
        pnlb2b.PerformCallback(selectedValues);
    }
</script>
<style>
    td.FormLabel {
        padding-top: 20px;
    }
</style>
<asp:Label ID="messageLabel" runat="server" Visible="false" EnableViewState="false"
    CssClass="InfoMessage" /><asp:ValidationSummary ID="ValidationSummary1" runat="server"
        CssClass="ValidationMessage" ForeColor="Transparent" HeaderText="Important Message:">
    </asp:ValidationSummary>
<dx:ASPxPanel ID="pnlb2c" runat="server" ClientIDMode="Static" ClientInstanceName="pnlb2c" DefaultButton="registrationButton"
    Visible="false">
    <PanelCollection>
        <dx:PanelContent>
            <table id="Table1" cellspacing="1" cellpadding="1" width="500" border="0">
                <tr class="HighlightTableRow">
                    <td class="ColumnLabel" colspan="2">
                        Shipping Information:
                    </td>
                </tr>
                <tr>
                    <td class="FormLabel" style="width: 161px" colspan="1" rowspan="1" runat="server"
                        id="ShippingFirstNameLabelCell">
                        First Name:
                    </td>
                    <td>
                        <asp:TextBox ID="shpfirstnameTextBox" runat="server" CssClass="FormField" Width="201px"
                            MaxLength="10" />
                        <span class="RequiredFieldLabel">*</span>
                        <asp:RequiredFieldValidator ID="firstnameRequiredFieldValidator" runat="server" CssClass="RequiredFieldLabel"
                            ControlToValidate="shpfirstnameTextBox" ErrorMessage="First name of shipping address is required"
                            Display="None">
            *</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr id="TrShippingLastName" runat="server">
                    <td class="FormLabel" style="width: 161px" runat="server" id="ShippingLastNameLabelCell">
                        Last Name:
                    </td>
                    <td>
                        <asp:TextBox ID="shplastnameTextBox" runat="server" CssClass="FormField" Width="201px"
                            MaxLength="19" />
                        <span class="RequiredFieldLabel">*</span>
                        <asp:RequiredFieldValidator ID="lastnameRequiredValidator" runat="server" CssClass="RequiredFieldLabel"
                            ControlToValidate="shplastnameTextBox" ErrorMessage="Last name of shipping address is required"
                            Display="None">
            *</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="FormLabel" style="width: 161px" runat="server" id="ShippingAddress1LabelCell">
                        Address:
                    </td>
                    <td>
                        <asp:TextBox ID="shpaddress1TextBox" runat="server" CssClass="FormField" Width="201px" />
                        <span class="RequiredFieldLabel">*</span>
                        <asp:RequiredFieldValidator ID="address1RequiredFieldValidator" runat="server" CssClass="RequiredFieldLabel"
                            ControlToValidate="shpaddress1TextBox" ErrorMessage="Shipping address is required"
                            Display="None">
            *</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td runat="server" id="ShippingAddress2LabelCell" style="width: 161px">
                    </td>
                    <td>
                        <asp:TextBox ID="shpaddress2TextBox" runat="server" CssClass="FormField" Width="201px" />
                    </td>
                </tr>
                <tr>
                    <td runat="server" id="ShippingAddress3LabelCell" style="width: 161px">
                    </td>
                    <td>
                        <asp:TextBox ID="shpaddress3TextBox" runat="server" CssClass="FormField" Width="201px" />
                    </td>
                </tr>
                <tr>
                    <td class="FormLabel" style="width: 161px" runat="server" id="ShippingCityLabelCell">
                        City:
                    </td>
                    <td>
                        <asp:TextBox ID="shpcityTextBox" runat="server" CssClass="FormField" Width="201px" />
                        <span class="RequiredFieldLabel">*</span>
                        <asp:RequiredFieldValidator ID="cityRequiredFieldValidator" runat="server" CssClass="RequiredFieldLabel"
                            ControlToValidate="shpcityTextBox" ErrorMessage="City of shipping address is required"
                            Display="None">
            *</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="FormLabel" style="width: 161px" runat="server" id="ShippingStateLabelCell">
                        State:
                    </td>
                    <td>
                        <uc1:CommonStateDropDownControl ID="CommonStateDropDownControl1" runat="server" autopostback="true" />
                        <span class="RequiredFieldLabel">*</span>
                        <asp:TextBox ID="shpStateTextBox" Visible="false" runat="Server" CssClass="FormField"
                            Width="201px" />
                        <asp:RequiredFieldValidator ID="stateRequiredFieldValidator" runat="server" CssClass="RequiredFieldLabel"
                            ControlToValidate="CommonStateDropDownControl1" ErrorMessage="State of shipping address is required"
                            Display="None">
                            *</asp:RequiredFieldValidator>
                        <asp:RequiredFieldValidator ID="OtherStateRequiredFieldValidator" runat="server" CssClass="RequiredFieldLabel"
                            ControlToValidate="shpStateTextBox" ErrorMessage="State of shipping address is required"
                            Display="None">
                        *</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="FormLabel" style="width: 161px; height: 22px" runat="server" id="ShippingZipLabelCell">
                        Zip:
                    </td>
                    <td style="height: 22px">
                        <asp:TextBox ID="shpzipTextBox" runat="server" CssClass="FormField" Width="104px"
                            MaxLength="9" />
                        <span class="RequiredFieldLabel">*</span>
                        <asp:RequiredFieldValidator ID="zipcodeRequiredFieldValidator" runat="server" CssClass="RequiredFieldLabel"
                            ControlToValidate="shpzipTextBox" ErrorMessage="Zip code of shipping address is required"
                            Display="None">
                        *</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr runat="server" id="TrShippingCountry">
                    <td style="width: 161px; height: 22px" class="FormLabel" runat="server" id="ShippingCountryLabelCell">
                        Country:
                    </td>
                    <td style="height: 22px">
                        <asp:Label ID="shpCountryLabel" runat="server" CssClass="CheckOutAddress" />
                        <asp:TextBox ID="shpCountryTextBox" runat="server" CssClass="FormField" Width="82px"
                            MaxLength="9"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="FormLabel" style="width: 161px" runat="server" id="ShippingPhoneLabelCell">
                        Phone:
                    </td>
                    <td>
                        <asp:TextBox ID="shpphoneTextBox" runat="server" CssClass="FormField" Width="151px" />
                    </td>
                </tr>
            </table>
            <table id="Table2" cellspacing="1" cellpadding="1" width="500" border="0" style="margin-top:20px;">
                <tr class="HighlightTableRow">
                    <td class="ColumnLabel" style="width: 161px; height: 20px">
                        Billing Information:
                    </td>
                    <td style="height: 20px">
                        <asp:CheckBox ID="sameasshippingCheckBox" runat="server" AutoPostBack="true" Text="Same as Shipping Info"
                            OnCheckedChanged="sameasshippingCheckBox_CheckedChanged" />
                    </td>
                </tr>
                <tr>
                    <td class="FormLabel" style="width: 146px" runat="server" id="BillingFirstNameLabelCell">
                        First Name:
                    </td>
                    <td>
                        <asp:TextBox ID="blgfirstnameTextBox" runat="server" CssClass="FormField" Width="201px"
                            MaxLength="10" />
                        <span class="RequiredFieldLabel">*</span>
                        <asp:RequiredFieldValidator ID="bfirstnameRequiredFieldValidator" runat="server"
                            CssClass="RequiredFieldLabel" ControlToValidate="blgfirstnameTextBox" ErrorMessage="First name of billing address is required"
                            Display="None">
            *</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr id="TrBillingLastName" runat="server">
                    <td class="FormLabel" style="width: 146px" runat="server" id="BillingLastNameLabelCell">
                        Last Name:
                    </td>
                    <td>
                        <asp:TextBox ID="blglastnameTextBox" runat="server" CssClass="FormField" Width="201px"
                            MaxLength="19" /><span class="RequiredFieldLabel">*</span>
                        <asp:RequiredFieldValidator ID="blastRequiredFieldValidator" runat="server" CssClass="RequiredFieldLabel"
                            ControlToValidate="blglastnameTextBox" ErrorMessage="Last name of billing address is required"
                            Display="None">
                *</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="FormLabel" style="width: 146px" runat="server" id="BillingAddress1LabelCell">
                        Address:
                    </td>
                    <td>
                        <asp:TextBox ID="blgaddress1TextBox" runat="server" CssClass="FormField" Width="199px" />
                        <span class="RequiredFieldLabel">*</span>
                        <asp:RequiredFieldValidator ID="baddress1FieldValidator" runat="server" CssClass="RequiredFieldLabel"
                            ControlToValidate="blgaddress1TextBox" ErrorMessage="Billing address is required"
                            Display="None">
            *</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td style="width: 146px" runat="server" id="BillingAddress2LabelCell">
                    </td>
                    <td>
                        <asp:TextBox ID="blgaddress2TextBox" runat="server" CssClass="FormField" Width="197px" />
                    </td>
                </tr>
                <tr>
                    <td style="width: 146px" runat="server" id="BillingAddress3LabelCell">
                    </td>
                    <td>
                        <asp:TextBox ID="blgaddress3Textbox" runat="server" CssClass="FormField" Width="200px" />
                    </td>
                </tr>
                <tr>
                    <td class="FormLabel" style="width: 146px" runat="server" id="BillingCityLabelCell">
                        City:
                    </td>
                    <td>
                        <asp:TextBox ID="blgcityTextBox" runat="server" CssClass="FormField" Width="199px" /><span
                            class="RequiredFieldLabel">*</span>
                        <asp:RequiredFieldValidator ID="bcityRequiredFieldValidator" runat="server" CssClass="RequiredFieldLabel"
                            ControlToValidate="blgcityTextBox" ErrorMessage="City of billing address is required"
                            Display="None">
            *</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="FormLabel" style="width: 146px" runat="server" id="BillingStateLabelCell">
                        State:
                    </td>
                    <td>
                        <uc1:CommonStateDropDownControl ID="CommonStateDropDownControl2" runat="server" />
                        <asp:Label ID="blgstateLabel" runat="server" CssClass="FormOutput" /><span class="RequiredFieldLabel">*</span>
                        <asp:TextBox ID="blgStateTextBox" Visible="false" runat="Server" CssClass="FormField"
                            Width="201px" />
                        <asp:RequiredFieldValidator ID="bstateRequiredFieldValidator" runat="server" CssClass="RequiredFieldLabel"
                            ControlToValidate="CommonStateDropDownControl2" ErrorMessage="State of billing address is required"
                            Display="None">*</asp:RequiredFieldValidator>
                        <asp:RequiredFieldValidator ID="bOtherstateRequiredFieldValidator" runat="server" CssClass="RequiredFieldLabel"
                            ControlToValidate="blgStateTextBox" ErrorMessage="State of billing address is required"
                            Display="None">
                        *</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="FormLabel" style="width: 146px" runat="server" id="BillingZipLabelCell">
                        Zip:
                    </td>
                    <td>
                        <asp:TextBox ID="blgzipTextBox" runat="server" CssClass="FormField" Width="82px"
                            MaxLength="9"></asp:TextBox><asp:Label ID="blgzipLabel" runat="server" CssClass="FormOutput"></asp:Label><span
                                class="RequiredFieldLabel">*</span>
                        <asp:RequiredFieldValidator ID="bzipRequiredFieldValidator" runat="server" CssClass="RequiredFieldLabel"
                            ControlToValidate="blgzipTextBox" ErrorMessage="Zip code billing address is required"
                            Display="None">
                        *</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr runat="server" id="TrBillingCountry">
                    <td style="width: 161px; height: 22px" class="FormLabel" runat="server" id="BillingCountryLabelCell">
                        Country:
                    </td>
                    <td style="height: 22px">
                        <asp:Label ID="blgCountryLabel" runat="server" CssClass="CheckOutAddress" />
                        <asp:TextBox ID="blgCountryTextBox" runat="server" CssClass="FormField" Width="82px"
                            MaxLength="9"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="FormLabel" style="width: 146px">
                        Phone:
                    </td>
                    <td>
                        <asp:TextBox ID="blgphoneTextBox" runat="server" CssClass="FormField" Width="151px" /><span
                            class="RequiredFieldLabel">*
                            <asp:RequiredFieldValidator ID="blgphoneRequiredValidator" runat="server" ControlToValidate="blgphoneTextBox"
                                ErrorMessage="Please provide a billing phone number" Display="None">*</asp:RequiredFieldValidator></span>
                    </td>
                </tr>
                <tr>
                    <td class="FormButtonMatte" align="center" colspan="2">
                        <asp:Button ID="registrationButton" runat="server" CssClass="btn FormButtonAlternate"
                            Text="Save Registration" OnClick="registrationButton_Click" />
                        <asp:Button ID="cancelButton" runat="server" CssClass="btn FormButtonAlternate" Text="Cancel"
                            CausesValidation="false" OnClick="cancelButton_Click" />
                    </td>
                </tr>
            </table>
        </dx:PanelContent>
    </PanelCollection>
</dx:ASPxPanel>
<dx:ASPxCallbackPanel ID="pnlb2b" runat="server" ClientIDMode="Static" ClientInstanceName="pnlb2b"
    Visible="false" OnCallback="pnlb2b_Callback" CssClass="CustomerInfo" DefaultButton="btnb2bContinue">
    <PanelCollection>
        <dx:PanelContent>
            <div class="ShippingAddressDiv">
                <div class="CustomerAddressHeadingDiv">
                    <span class="CustomerAddressHeading">Shipping Information</span>
                    <dx:ASPxButton ID="btnChangeDefault" runat="server" ClientIDMode="Static" ClientInstanceName="btnChangeDefault"
                        Text="Change Default Address" AutoPostBack="false" ClientSideEvents-Click="function(s,e){popupMultiAddress.Show();}"
                        CssClass="btn DT-Button ChangeDefaultShipButton" />
                </div>
                <div class="AddressRow">
                    <div class="AddressLabel">
                        Ship To:</div>
                    <dx:ASPxLabel ID="shpnameLabel" runat="server" ClientIDMode="Static" ClientInstanceName="shpnameLabel"
                        CssClass="AddressField" />
                </div>
                <div class="AddressRow">
                    <div class="AddressLabel">
                        Address:</div>
                    <dx:ASPxLabel ID="shpaddressLabel" runat="server" ClientIDMode="Static" ClientInstanceName="shpaddressLabel"
                        CssClass="AddressField" />
                </div>
                <div class="AddressRow">
                    <div class="AddressLabel">
                        Phone:</div>
                    <dx:ASPxLabel ID="shpphoneLabel" runat="server" ClientIDMode="Static" ClientInstanceName="shpphoneLabel"
                        CssClass="AddressField" />
                </div>
            </div>
            <div class="BillingAddressDiv">
                <div class="CustomerAddressHeadingDiv">
                    <span class="CustomerAddressHeading">Billing Information</span>
                </div>
                <div class="AddressRow">
                    <div class="AddressLabel">
                        Name:</div>
                    <dx:ASPxLabel ID="blgnameLabel" runat="server" ClientIDMode="Static" ClientInstanceName="blgnameLabel"
                        CssClass="AddressField" />
                </div>
                <div class="AddressRow">
                    <div class="AddressLabel">
                        Address:</div>
                    <dx:ASPxLabel ID="blgaddress1Label" runat="server" ClientIDMode="Static" ClientInstanceName="blgaddressLabel"
                        CssClass="AddressField" />
                </div>
                <div class="AddressRow">
                    <div class="AddressLabel">
                        Phone:</div>
                    <dx:ASPxLabel ID="blgphoneLabel" runat="server" ClientIDMode="Static" ClientInstanceName="blgphoneLabel"
                        CssClass="AddressField" />
                </div>
            </div>
            <div class="ContinueCancelButtons">
                <dx:ASPxButton ID="btnb2bContinue" runat="server" ClientIDMode="Static" ClientInstanceName="btnb2bContinue"
                    Text="Continue" OnClick="btnb2bContinue_Click" CssClass="DT-Button" />
                <dx:ASPxButton ID="btnb2bCancel" runat="server" ClientIDMode="Static" ClientInstanceName="btnb2bCancel"
                    Text="Cancel" OnClick="cancelButton_Click" CssClass="btn CancelLink DT-Button secondary-btn-theme" />
            </div>
        </dx:PanelContent>
    </PanelCollection>
</dx:ASPxCallbackPanel>
<dx:ASPxPopupControl ID="popupMultiAddress" runat="server" ClientIDMode="Static"
    ClientInstanceName="popupMultiAddress" CloseAction="CloseButton" ShowCloseButton="true"
    PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" HeaderText=""
    Modal="true" AllowDragging="true" AllowResize="true" Width="800px">
    <ContentCollection>
        <dx:PopupControlContentControl>
            <fieldset>
                <legend>Additional Ship To Addresses</legend>
                <div id="defaultShipInstructions">
                    <dx:ASPxLabel ID="lbl1" runat="server" />
                </div>
                <div id="defaultShipHint">
                    <dx:ASPxLabel ID="ASPxLabel1" runat="server"/>
                </div>
                <!--This is where the hint goes -->
                <dx:ASPxGridView ID="grdMultiAddress" runat="server" ClientIDMode="Static" ClientInstanceName="grdMultiAddress"
                    Width="725px" CssClass="MultiShipLookupTable" OnLoad="grdMultiAddress_Load">
                    <Columns>
                        <dx:GridViewDataColumn FieldName="AccountShipping_ID" Caption="Code" Settings-AutoFilterCondition="Contains"
                            Width="40" />
                        <dx:GridViewDataColumn FieldName="ShipToName" Caption="Ship To Name" Settings-AutoFilterCondition="Contains" />
                        <dx:GridViewDataColumn FieldName="ADDRESS1" Caption="Address Line 1" Settings-AutoFilterCondition="Contains" />
                        <dx:GridViewDataColumn FieldName="ADDRESS2" Caption="Address Line 2" Settings-AutoFilterCondition="Contains" />
                        <dx:GridViewDataColumn FieldName="ADDRESS3" Caption="Address Line 3" Settings-AutoFilterCondition="Contains" />
                        <dx:GridViewDataColumn FieldName="City" Caption="City" Settings-AutoFilterCondition="Contains" />
                        <dx:GridViewDataColumn FieldName="State" Caption="State" Settings-AutoFilterCondition="Contains" />
                        <dx:GridViewDataColumn FieldName="Zip" Caption="Zip Code" Settings-AutoFilterCondition="Contains" />
                        <dx:GridViewDataColumn FieldName="Country" Caption="Country" Settings-AutoFilterCondition="Contains" />
                    </Columns>
                    <ClientSideEvents RowClick="function(s,e){grdMultiAddress.GetRowValues(e.visibleIndex, 'AccountShipping_ID', OnMultiAddressRow);popupMultiAddress.Hide();}" />
                    <SettingsPager AlwaysShowPager="true" PageSize="10" ShowEmptyDataRows="true" />
                    <Settings ShowFilterRow="true" />
                    <SettingsBehavior EnableRowHotTrack="true" />
                </dx:ASPxGridView>
            </fieldset>
        </dx:PopupControlContentControl>
    </ContentCollection>
</dx:ASPxPopupControl>
<!--

-->
Inheritance Hierarchy

System.Object
   System.Web.UI.Control
      System.Web.UI.TemplateControl
         System.Web.UI.UserControl
            Dovetail.Ecommerce.ControlBases.CyberStoreBaseControl
               Dovetail.Ecommerce.Controls.CustomerAccount3Control

See Also

Reference

CustomerAccount3Control Members
Dovetail.Ecommerce.Controls Namespace