Step two of the checkout process.
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.
The customizable properties for this control include the OrderHeaderCommentsLabel property which sets the Order Header Comments Label and the ShowOrderHeaderComments property which sets a value indicating whether Order Header Comments are shown.
Properties Inherited from the Base CyberStoreBaseControl
Properties specific to the CyberStoreBaseControl can be listed in the following categories:
- Override Properties
- Contextual Properties
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 ComConfig, UserData 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.
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="CheckOutShippingOptions.ascx.cs"
Inherits="Dovetail.Ecommerce.Controls.CheckOutShippingOptions" %>
<script language="javascript" type="text/javascript">
function textCounter(field, maxlimit) {
if (field.value.length >= maxlimit) {
field.value = field.value.substring(0, maxlimit);
alert('There is a ' + maxlimit + ' character limit.');
return false;
}
else {
//countfield.value = maxlimit - field.value.length;
}
}
</script>
<p>
<asp:Label ID="messageLabel" CssClass="ValidationMessage" runat="server"></asp:Label></p>
<dx:ASPxPanel ID="ShippingOptionsPanel" runat="server" ClientIDMode="Static" DefaultButton="continueButton" >
<PanelCollection>
<dx:PanelContent>
<table class="DefaultTable" id="Table1" style="width: 477px; height: 154px" cellspacing="1"
cellpadding="1" width="477">
<tr>
<td class="FormLabel" style="width: 184px">
<asp:Label ID="lblShippingMethods" runat="server" Text="Select Shipping Method:"></asp:Label>
</td>
<td>
<asp:DropDownList ID="shpmethodsDropDownList" CssClass="FormSelect" runat="server"
OnSelectedIndexChanged="shpmethodsDropDownList_SelectedIndexChanged" />
<asp:Label ID="shpoptionLabel" CssClass="FormLabel" runat="server" />
</td>
</tr>
<tr id="RequestedShippingDateRow" runat="server">
<td id="FormLabel" class="FormLabel" style="width: 184px">
<asp:Label ID="RequestShippingDateLabel" CssClass="FormLabel" runat="server">Requested Ship Date: </asp:Label>
</td>
<td>
<dx:ASPxDateEdit ID="RequestedShippingDateField" runat="server" ClientIDMode="Static" CssClass="FormTextArea" Width="220px" />
<asp:RangeValidator ID="RequestedShippingDateRangeValidator" Display="Dynamic" EnableClientScript="true"
ControlToValidate="RequestedShippingDateField" Type="Date" ErrorMessage="Date must be between [MinDate] and [maxdate]."
runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel" style="width: 200px">
<asp:Label ID="lblSpecialInstructions" runat="server" Text="Special Instructions(optional):"></asp:Label>
</td>
<td>
<asp:TextBox ID="specialinstructionsTextBox" CssClass="FormTextArea" runat="server"
MaxLength="30" Width="266px" Rows="5"></asp:TextBox>
</td>
</tr>
<tr>
<td id="AlternateKeyLabel" class="FormLabel" style="width: 200px">
<asp:Label ID="alternateKeyLabel" CssClass="FormLabel" runat="server"></asp:Label>
</td>
<td>
<asp:TextBox ID="AlternateKeyTextBox" runat="server" CssClass="FormTextArea" Width="266px"
MaxLength="10"></asp:TextBox>
</td>
</tr>
<tr id="OrderCommentsRow" runat="server">
<td class="FormLabel" id="OrderCommentsLabel" style="width: 200px" valign="top" runat="server">
Order Comments (optional):
</td>
<td>
<asp:TextBox ID="OrderHeaderCommentsTextBox" CssClass="FormTextArea" runat="server"
MaxLength="30" Width="266px" Rows="5" TextMode="MultiLine"></asp:TextBox>
</td>
</tr>
<tr>
<td class="FormButtonMatte" colspan="2">
<asp:Button ID="continueButton" CssClass="FormButtonAlternate" runat="server" Text="Continue"
OnClick="continueButton_Click"></asp:Button><asp:Button ID="cancelorderButton" CssClass="FormButtonAlternate"
runat="server" Text="Cancel" OnClick="cancelorderButton_Click"></asp:Button>
</td>
<td>
</td>
</tr>
</table>
</dx:PanelContent>
</PanelCollection>
</dx:ASPxPanel>
<dx:ASPxCallback ID="mainCallback" runat="server" ClientInstanceName="mainCallback"
OnCallback="mainCallback_Callback">
<ClientSideEvents CallbackComplete="function(s,e){
alert(e.result);
}" />
</dx:ASPxCallback>
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>