A quick order entry control.
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.
When the EnableOnHandQuantityDisplay property is set to true (default), the shopper can click the Check Stock button to view the total available quantity of that Item. The returned text is based on the configuration in the Quantity Settings tab within Catalog Configuration under Site Manager .
Individual Item quantity messages can be set to override the Site Manager's quantity settings in the Messages tab in Item Maintenance.
Both the site and Item settings for quantity messages may be set using either the LimitedAvailableMessage and LimitedUnavailableMessage properties for an Item of a limited quantity or the UnlimitedAvailableMessage and UnlimitedUnavailableMessage properties for an Item of unlimited quantity.
Tip:
Use the [QTY] and [UOM] within your messages to display the inventory quantity (determined using the On Hand Quantity Basis as setup in the Management Console in Site Manager > Catalog Configuration), and the unit of measure.
For example: "[QTY] [UOM] In Stock" might render as "1,234 EA In Stock" using the unallocated quantity as a basis.
Alternatively, a fixed message text could also be used which would not present actual inventory quantity.
For example: "Out of Stock".
Properties Inherited from the Base CyberStoreBaseControl
Note:
While all controls sharing a base control have common properties, these are only a potential subset of available properties as each individual control contains features and functionality specific to its design.
Be sure to review each child control in the Control Library for more information.
See an example of how to configure this control in SitePages.config.
<Control src="CatalogItemQuickCheckout.ascx"
Name="QuickEntry" />
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="CatalogItemQuickOrderEntry.ascx.cs" Inherits="Dovetail.Ecommerce.Controls.CatalogItemQuickOrderEntry" %>
<style type="text/css">
.ItemListingPricingStockCol {
width: 10px;
}
.dxeButtonEditButton {
font-size: 8px;
text-transform: uppercase;
}
.dxEditors_edtEllipsisDisabled {
display: none;
}
.dxeButtonDisabled {
display: none;
}
.searchbutton {
padding-left: 5px;
}
</style>
<dx:ASPxCallback runat="server" ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" OnCallback="ASPxCallback1_Callback">
<ClientSideEvents CallbackComplete="processStockCode_Callback" />
</dx:ASPxCallback>
<p>
<div id="divTopContent" runat="server" style="width:725px;">
<div style="width: 275px; float: right; background-color: #e3e3e3; border: 1px solid #000; padding: 10px; margin-right: 5px;margin-bottom:10px;">
<span style="float: right;">
<asp:Label ID="lblOrderTotal" runat="server" CssClass="CatalogProductDetailPrice" /></span><b>Line Total: </b>
</div>
<dx:ASPxButton ID="btnAddToCart_top" CssClass="DT-Button btn btn-inverse" Text="Add to Cart" runat="server"
ClientSideEvents-Click="function(s,e){btnAddToCart_top.SetText('Submitting...');btnAddToCart_bottom.SetText('Submitting...');document.location='shoppingcart.aspx';}"
AutoPostBack="false" ClientIDMode="Static" />
<br />
</div>
<asp:Label ID="messageLabel" CssClass="ValidationMessage" runat="server" Visible="false"></asp:Label>
</p>
<div>
<asp:DataGrid ID="ListingGrid" CssClass="CatalogItemListingByCategoryTable" runat="server"
AutoGenerateColumns="false" AlternatingItemStyle-CssClass="HighlightTableRow"
BorderWidth="0px" ShowHeader="true" OnItemDataBound="ListingGrid_ItemDataBound">
<AlternatingItemStyle CssClass="CatalogHighlightTableRow" />
<HeaderStyle CssClass="ItemListingHeader" />
<Columns>
<asp:TemplateColumn HeaderText="">
<ItemTemplate>
<div style="width: 25px;">
<dx:ASPxHyperLink ID="lnkDelete" runat="server" Text="Del" ClientVisible="false" />
</div>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Stock Code" ItemStyle-CssClass="ItemListingStockCodeCol">
<ItemTemplate>
<dx:ASPxComboBox ID="cmbStockCode" runat="server" CssClass="FormField QuickEntryStockCode"
AnimationType="Auto" DropDownStyle="DropDownList" TextField="StockCode" ValueField="StockCode"
DropDownRows="10" TextFormatString="{0} - {1}" IncrementalFilteringDelay="1500"
IncrementalFilteringMode="Contains" FilterMinLength="4" CallbackPageSize="10"
EnableCallbackMode="true" ValueType="System.String" AllowMouseWheel="true"
DropDownButton-Visible="false" Width="300" DropDownWidth="600" Height="30" Paddings-Padding="4"
OnItemsRequestedByFilterCondition="cmbStockCode_OnItemsRequestedByFilterCondition_SQL"
OnItemRequestedByValue="cmbStockCode_OnItemRequestedByValue_SQL"
DisabledStyle-Border-BorderStyle="None" DisabledStyle-ForeColor="Black"
DisabledStyle-BackColor="Transparent" DisabledStyle-BackgroundImage-ImageUrl="nothing.gif"
DisabledStyle-Cursor="default" OnInit="cmbStockCode_Init">
<Columns>
<dx:ListBoxColumn FieldName="StockCode" Width="100px" />
<dx:ListBoxColumn FieldName="Name" Width="150px" />
</Columns>
<Buttons>
<dx:EditButton Text="Search" Visible="false" CssClass="DT-Button" />
</Buttons>
</dx:ASPxComboBox>
<asp:HiddenField ID="hfSelectedStockCode" runat="server" />
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText=" " ItemStyle-CssClass="ItemListingNameCol" ItemStyle-HorizontalAlign="center">
<ItemTemplate>
<div style="width: 125px;">
<span id="spnOnHand" runat="server" />
</div>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Qty" ItemStyle-CssClass="ItemListingPricingStockCol AddtoCartqtyQty">
<ItemTemplate>
<dx:ASPxTextBox ID="txtStockCodeQuantity" runat="server" Width="40px" />
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Price" ItemStyle-CssClass="ItemListingNameCol">
<ItemTemplate>
<div style="width: 75px;">
<span id="spnPrice" runat="server" />
</div>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Total Price" ItemStyle-CssClass="ItemListingNameCol">
<ItemTemplate>
<div style="width: 100px;">
<span id="spnTotalPrice" class="CatalogProductDetailPrice" runat="server" />
</div>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
<span style="margin-bottom:20px;">
<asp:LinkButton ID="lnkAddMoreLines" runat="server" OnClick="lnkAddMoreLines_click" Text="Add More Lines" />
</span>
<br />
<div id="divBottomContent" runat="server" style="width:725px;">
<asp:LinkButton ID="lnkCancelOrder" runat="server" Text="Cancel Order" CssClass="DT-Button btn btn-mini pull-right" OnClientClick="return confirm('Are you sure you want to cancel the order? /n/nThis will clear all lines entered.');" OnClick="lnkCancelOrder_click" />
<br />
<dx:ASPxButton ID="btnAddToCart_bottom" CssClass="DT-Button btn btn-inverse" Text="Add to Cart" runat="server"
ClientSideEvents-Click="function(s,e){btnAddToCart_top.SetText('Submitting...');btnAddToCart_bottom.SetText('Submitting...');document.location='shoppingcart.aspx';}"
ClientIDMode="Static" AutoPostBack="false" />
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" />
</div>