CyberStore E-Payment 2023 Documentation
CatalogItemQuantityDiscountDetailControl Class
Members  Example 


Dovetail.Ecommerce.Controls Namespace : CatalogItemQuantityDiscountDetailControl Class

A catalog Item quantity discount detail control.

Remarks

The CatalogItemQuantityDiscountDetailControl displays detailed information for a specific Item, including Quantity Discount Pricing Display. You can configure column visibility and header text using Site Pages.

Use this control only after you have set up Discount Quantity Discounted Pricing. 

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.

Header Properties

There are a number of properties which dictate the header text of this control. These properties include the DescriptionHeaderText, NameHeaderTextPricingHeaderTextStockCodeHeaderText, and QtyinStockHeaderText property which sets the description, name, pricing, stock code, and quantity in stock header text respectively.

Display Properties

There are multiple properties that dictate what is displayed in this control. The following are displays that have a default value of "true" should you wish for these to be displayed you must change the value to "false".

There are multiple properties that dictate what is displayed in this control. The following is a display that has a default value of "false" should you wish for this to be displayed you must change the value to "true".

Properties Inherited from the Base ItemControl

The properties contained in the ItemControl base class allow for options regarding the type of Item that is in context for the control.

The properties IgnoreWhenModelIgnoreWhenSKU, and IgnoreWhenStockCode properties can be used to case the ItemControl to not process nor render when the appropriate Item type is valid for the Item.

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 CatalogItemQuantityDiscountDetailControl.

Sub Control Description
CatalogItemImageControl Displays the featured image and Item detail images that have a zoom feature.
CatalogItemQuantityDiscountDisplay Displays a table containing the discount breaks for an Item based off of the quantity discounts and Contract pricing.
CatalogOnHandQuantityDisplayControl Displays messages regarding available Item quantity and lead time.
CatalogPricingControl Displays the pricing for an Item.
CatalogItemListingByCategoryControl Displays a list of Items by Category.
Example
<Control src="CatalogItemDetailControl.ascx"
       PhotoWidth="200"
       UsePhoto="Photo2"
       ShowCategoryResults="true"
       HideQuantityInput="NO_VALUE_SPECIFIED"
       AddtoCartText="Add to Cart"
       ListPriceLabel="List Price:"
       YourPriceLabel="Your Price:"
       PriceLabel="Price Label:"
       LimitedAvailableMessage="&lt;nobr&gt;[QTY] [UOM] In Stock&lt;/nobr&gt;&lt;/br&gt;"
       LimitedUnavaliableMessage="&lt;nobr&gt;Restocking in 2 to 3 days&lt;/nobr&gt;&lt;/br&gt;"
       UnlimitedAvailableMessage="&lt;nobr&gt;[QTY] [UOM] In Stock&lt;/nobr&gt;&lt;/br&gt;"
       UnlimitedUnavailableMessage="&lt;nobr&gt;Ships in 2 weeks&lt;nobr&gt;&lt;/br&gt;"
       LeadTimeMessage="Leadtime: [LEADTIME]&lt;/br&gt;"
       EnableOnHandQuantityDisplay="true"
       EnableLeadTimeMessage="true"
       FirstRangeFormat="[START] to [END]"
       MiddleRangeFormat="[START] to [END]"
       LastRangeFormat="More than [START] "
       DisplayLastRange="true"
       />
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="CatalogItemQuantityDiscountDetailControl.ascx.cs"
    Inherits="Dovetail.Ecommerce.Controls.CatalogItemQuantityDiscountDetailControl" >
<@ Register TagPrefix="uc1" TagName="CatalogItemImageControl" Src="~/Control/CatalogItemImageControl.ascx" >
<@ Register TagPrefix="uc1" TagName="CatalogItemQuantityDiscountDisplay" Src="~/Control/CatalogItemQuantityDiscountDisplay.ascx" >
<@ Register TagPrefix="uc1" TagName="CatalogOnHandQuantityDisplayControl" Src="~/Control/CatalogOnHandQuantityDisplayControl.ascx" >
<@ Register TagPrefix="uc1" TagName="CatalogPricingControl" Src="~/Control/CatalogPricingControl.ascx" >
<@ Register TagPrefix="uc1" TagName="CatalogItemListingByCategoryControl" Src="~/Control/CatalogItemListingByCategoryControl.ascx" >
<@ Import Namespace="Dovetail.Ecommerce.Base.Module" %>

<span class="">
    <%# String.Format("<a class=\"CatalogDetailNavTrailCategory\" href=\"CatalogSubCategoryDisplay.aspx?CID={0}\">{1}</a>",Category_IDstr,CatNamestr) %>
    <b>&gt;&gt;</b> <span class="CatalogDetailNavTrailItemName">
        <%# ItemNamestr %>
    </span></span>
<table border="0" class="ItemQuantityDiscountDetailTable">
    <tr>
        <td valign="top">
            <p class="CatalogProductDetailHeadline">
                <%# HeadLinestr%>
            </p>
            <p class="CatalogProductDetailSubHeadline">
                <%# SubHeadlinestr%>
            </p>
            <p class="CatalogProductDetailDetail">
                <%# LongDescriptionstr%>
            </p>
        </td>
        <td>
            <uc1:CatalogItemImageControl ID="ImageControl" PhotoCssClass="CatalogProductDetailPicture"
                PictureNotFoundCssClass="CatalogProductDetailPictureNotFound" PhotoAltText='<%# HeadLinestr%>'
                StockCode='<%# StockCodestr%>' PhotoLocation='<%# UsePhoto%>' PhotoWidth='<#PhotoWidth>'
                Align="right" runat="server" />
        </td>
    </tr>
</table>
<br clear="all">
<uc1:CatalogItemListingByCategoryControl ID="CatalogItemListing" runat="server" />
<asp:DataGrid ID="ListingGrid" runat="server" CssClass="DefaultTable" AutoGenerateColumns="false"
    AlternatingItemStyle-CssClass="HighlightTableRow" HeaderStyle-CssClass="HighlightTableRow"
    BorderWidth="0px" ShowFooter="true" ShowHeader="true" BorderStyle="Solid" ItemStyle-CssClass="ItemByCategoryListingRow"
    AlternatingItemStyle-CssClas="ItemByCategoryListingRow">
    <AlternatingItemStyle CssClass="ItemByCategoryListingHighlightRow"></AlternatingItemStyle>
    <HeaderStyle CssClass="ItemListingHeader"></HeaderStyle>
    <Columns>
        <asp:TemplateColumn HeaderText="Stock Code" ItemStyle-CssClass="ItemListingStockCodeCol">
            <ItemTemplate>
                <%# String.Format("<a class=\"CatalogListNavTrail\" href=\"{0}\">{1}</a>", Dovetail.Ecommerce.BusinessLogic.Catalog.FriendlyUrl.CategoryItemDetailPage(DataBinder.Eval(Container.DataItem, "StockCode").ToString(), DataBinder.Eval(Container.DataItem, "ItemName").ToString(), Dovetail.Ecommerce.Module.Catalog.Instance.Category_ID), DataBinder.Eval(Container.DataItem, "StockCode"))%>
            </ItemTemplate>
        </asp:TemplateColumn>
        <asp:TemplateColumn HeaderText="Name" ItemStyle-CssClass="ItemListingNameCol">
            <HeaderStyle></HeaderStyle>
            <ItemTemplate>
                <%# String.Format("<a class=\"CatalogListNavTrail\" href=\"{0}\">{1}</a>", Dovetail.Ecommerce.BusinessLogic.Catalog.FriendlyUrl.CategoryItemDetailPage(DataBinder.Eval(Container.DataItem, "StockCode").ToString(), DataBinder.Eval(Container.DataItem, "ItemName").ToString(), Dovetail.Ecommerce.Module.Catalog.Instance.Category_ID), DataBinder.Eval(Container.DataItem, "ItemName"))%>
            </ItemTemplate>
        </asp:TemplateColumn>
        <asp:TemplateColumn HeaderText="Description" ItemStyle-CssClass="ItemListingDescriptionCol">
            <ItemTemplate>
                <%# DataBinder.Eval(Container.DataItem, "ShortDescription")%></ItemTemplate>
        </asp:TemplateColumn>
        <asp:TemplateColumn HeaderText="Qty in Stock" ItemStyle-CssClass="ItemListingQtyinStockCol">
            <HeaderStyle />
            <ItemTemplate>
                <uc1:CatalogOnHandQuantityDisplayControl ID="OnHandQuantityDisplay" runat="server"
                    Item_ID='<%# DataBinder.Eval(Container.DataItem, "Item_ID") %>' OnHandDisplayCssClass="OnHandQuantityItemVerticleListings"
                    LimitedUnavaliableMessage="[QTY] [UOM]" OnHandDisplayMessage="[QTY] [UOM]" LimitedAvailableMessage="[QTY] [UOM]"
                    UnlimitedAvailableMessage="[QTY] [UOM]" UnlimitedUnavailableMessage="[QTY] [UOM]"
                    EnableLeadTimeMessage="false" />
            </ItemTemplate>
        </asp:TemplateColumn>
        <asp:TemplateColumn HeaderText="Order Qty&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Price/Unit">
            <ItemTemplate>
                <uc1:CatalogAddtoCartButton ID="CatalogaddtocartInput" runat="server" Item_ID='<%# Convert.ToInt32(DataBinder.Eval(Container.DataItem, "Item_ID"))%>'
                    ButtonCss="CatalogProductVerticalListButton" AccButtonCss="CatalogAccessoryAddButton"
                    DisplayMode="multiaddinput" />
            </ItemTemplate>
            <FooterTemplate>
                <uc1:CatalogPricingControl ID="Catalogaddtocartbutton1" runat="server" Item_ID='<%# Convert.ToInt32(DataBinder.Eval(Container.DataItem, "Item_ID"))%>'
                     DisplayMode="multiaddbutton" />
            </FooterTemplate>
        </asp:TemplateColumn>
    </Columns>
</asp:DataGrid>
<p class="CatalogProductDetailQtyPricing">
    <uc1:CatalogItemQuantityDiscountDisplay ID="CatalogItemQuantityDiscountDisplay1"
        runat="server" />
</p>
Inheritance Hierarchy

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

See Also

Reference

CatalogItemQuantityDiscountDetailControl Members
Dovetail.Ecommerce.Controls Namespace