CyberStore Documentation
CatalogOnHandQuantityDisplayControl Class
Members  Example 


Dovetail.Ecommerce.Controls Namespace : CatalogOnHandQuantityDisplayControl Class

A catalog on hand quantity display control. 

Remarks

The CatalogOnHandQuantityDisplayControl displays messages regarding available Item quantity and lead time. You can only use this control within another control that displays Items.

Available quantity messages are based on the number of Items available and whether that product is marked as limited.

An example of the CatalogOnHandQuantityDisplayControl in use is below:

 

Lead time messages consist of a lower and an upper range (2 to 3 weeks) for expected ship dates. The lower range is provided by SYSPRO and the upper range is calculated using the Lead Time Padding associated with an Item. To review how to set Site-wide minimums for Lead times and Padding, see the Catalog Configuration and Item Maintenance sections within the User Guide.

Property Usage
Display Properties

Use the OnHandDisplayCssClass property to customize the CSS Class per instance.

The EnableOnHandQuantityDisplay gets or sets whether the On Hand Quantity message should be displayed.

The ShowByWarehouse property allows for one to configure the ability to show or hide quanty subtotals by warehouse. The default is to use the value specified by the "Display Quanty Subtotals by Warehouse" setting in the Site Manager > Catalog Configuration screen found in the Quantity Settings tab.

When displaying quantity subtotals by warehouse, the WarehouseQuantityMessage property allows for customizing the HTML code used to render each row of the warehouse listing.

Important Note:

It is not recommended that sites display inventory quantity by warehouse when utilizing the CyberStore inventory buffer feature. Current business logic will display quanties by each warehouse, with each quantity being reduced by the buffer amount.

Message Properties

The EnableLeadTimeMessage sets whether the Lead Time Message should be displayed.

The LeadTimeMessage sets the text to be displayed for an item describing shipment date.

The LimitedAvailableMessage sets the message to display when an Item is Limited and Available.

The LimitedUnavailableMessage sets the message to display when an Item is Limited and Unavailable.

The UnlimitedAvailableMessage sets the message to display when an Item is Available and set as Unlimited.

The UnlimitedUnavailableMessage sets the message to display when an Item is Unavailable and set as Unlimited.

Properties Inherited from the Base ListingControl

The properties contained in the ListingControl base class are available to either include or exclude certain data from the scope of Items being listed in the control.

To expand the scope of Items to be inclusive of all Items in the current Category and all of its child hierarchy, set the IncludeItemsFromAllChildCategories property to true, or conversely to limit scope just to the current Category, set its value to false.

Scope can also be limited, or expanded, based on the type of Item in the listing. Use the IncludeModelsIncludeSKUs, and IncludeStockCodes properties to do this. Set them to true to include, and false to exclude.

The OverrideCategoryList property allows for the ListingControl to ignore the current Category in context and use a specified list of Categories as specified by a comma-separated list of Category_ID values. For example "1,5,7,124,678".

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.

Example
See an example of how to configure this control in SitePages.config.
<Control src="CatalogOnHandQuantityDisplayControl.ascx"
       Item_ID="0"
       LimitedAvailableMessage=""
       LimitedUnavaliableMessage=""
       UnlimitedAvailableMessage=""
       UnlimitedUnavailableMessage=""
       LeadTimeMessage=""
       EnableOnHandQuantityDisplay="false"
       EnableLeadTimeMessage="false"
       OnHandDisplayCssClass=""
       />
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="CatalogOnHandQuantityDisplayControl.ascx.cs"
    Inherits="Dovetail.Ecommerce.Controls.CatalogOnHandQuantityDisplayControl" %>
<span id="OnHandDisplaySpan" enableviewstate="true" runat="server" class="CatalogOnHandQuantityDisplay" />
Inheritance Hierarchy

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

See Also

Reference

CatalogOnHandQuantityDisplayControl Members
Dovetail.Ecommerce.Controls Namespace

Site Manager

Catalog Configuration