CyberStore Documentation
CatalogItemDetailControl Class
Members  Example 


Dovetail.Ecommerce.Controls Namespace : CatalogItemDetailControl Class

A catalog Item Detail control.

Remarks

The CatalogItemDetailControl displays detailed information about a product. The control is typically used as the main display component for a specific Item page within the catalog.

It is the base control used by CyberStore to display the main details of an Item on an "Item Detail" page. An Item Detail page is identified by its web address. All Item Detail pages will include the key URL path /product/ immediately after the application path (typically /ecommerce/).

The following is an example of a URL for an Item Detail page:  www.TheOutdoorsCompany.com/ecommerce/product/ser200/bicycle-child-seat.

 

 

By default, the control includes within it the descriptive information of an Item including the Item's Name, Stock Code, Description, Long Description, Headline, Sub Headline, and Long Description.

In addition, the control includes Item details that are displayed via the use of additional, or sub controls.

 

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.

Item Properties

The Item Detail Control can be customized by using Item properties which include the ItemData property which gets the information describing the item. Similarily, the Item_IDstr property gets or sets the Item ID string. Likewise, the ItemNamestr property can set the Item Name string. Lastly, the SKUSelectionMode property gets or sets the SKU selection mode.

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

Sub Control Description
CatalogOnHandQuanityDisplayControl Displays the on hand quantity information about an Item.
CatalogPricingControl Displays pricing for an Item along with the ability to add to cart.
CatalogItemImageControl Displays the Item's image.
CatalogItemQuantityDiscountDisplay Displays the Item's quantity discount pricing information.
CatalogItemSelectionControl Displays the Item's advanced SKU selection when the Item is a model.
CatalogItemListButtonControl Displays the Item List button for the Item when logged in.
CatalogCategoryBreadcrumbControl Displays the Item's Category breadcrumb.

 

Example
See an example of how to configure this control in SitePages.config.
<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.

 

<@ Register TagPrefix="uc1" TagName="CatalogUnitPriceControl" Src="~/Control/CatalogUnitPriceControl.ascx" >
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CatalogItemDetailControl.ascx.cs"
    Inherits="Dovetail.Ecommerce.Controls.CatalogItemDetailControl" %>
<@ Register TagPrefix="uc1" TagName="CatalogOnHandQuantityDisplayControl" Src="~/Control/CatalogOnHandQuantityDisplayControl.ascx" >
<@ Register TagPrefix="uc1" TagName="CatalogPricingControl_Detail" Src="~/Control/CatalogPricingControl.ascx" >
<@ Register TagPrefix="uc1" TagName="CatalogItemImageControl" Src="~/Control/CatalogItemImageControl.ascx" >
<@ Register TagPrefix="uc1" TagName="CatalogItemQuantityDiscountDisplay" Src="~/Control/CatalogItemQuantityDiscountDisplay.ascx" >
<@ Register TagPrefix="uc1" TagName="CatalogItemSelectionControl" Src="~/Control/CatalogItemSelectionControl.ascx" >
<@ Register TagPrefix="uc1" TagName="CatalogItemListButtonControl" Src="~/Control/CatalogItemListButtonControl.ascx" >
<@ Register TagPrefix="uc1" TagName="CatalogCategoryBreadcrumbControl" Src="~/Control/CatalogCategoryBreadcrumbControl.ascx" >
<%@ Import Namespace="Dovetail.Ecommerce.Base.Module" %>

<div class="col-xs-12" style="margin-bottom: 25px;">
    <div>
        <uc1:CatalogCategoryBreadcrumbControl ID="ctrlCatalogCategoryBreadcrumbControl" runat="server" />
    </div>
    <div>
        <h1 class="CatalogProductDetailHeadline">
            <%# HeadLinestr%>
        </h1>
        <h2 class="CatalogProductDetailSubHeadline">
            <%# SubHeadlinestr%>
        </h2>
    </div>
    <div>
        <uc1:CatalogItemListButtonControl ID="ItemListButton" runat="server" StockCode="<%# StockCode %>" />
    </div>
    <div class="SKUSelection">
        <uc1:CatalogItemSelectionControl ID="SelectionControl" runat="server" Model_ID="<%# Item_ID %>" />
    </div>


    <div class="col-xs-5">
        <uc1:CatalogItemImageControl ID="ImageControl" PhotoCssClass="CatalogProductDetailPicture"
            PictureNotFoundCssClass="CatalogProductDetailPictureNotFound"
            PhotoAltText='<# String.Format("{0} - {1} >'
            ZoomWindowText='<%# String.Format("{0} - {1}", StockCode, Name) %>'
            ExpandedWindowText='<# String.Format("{0} - {1} >'
            StockCode='<%# StockCode%>' Align="right" runat="server" EnableZoom="true" />


    </div>
    <div class="col-xs-7">
        <div id="divAltPartNumbers" runat="server" visible="false" class="CatalogProductDetailAltPartNum">
            <span class="CatalogProductDetalAltPartNumLabel"><%# AlternatePartNumberLabelText %></span>
            <span><%# AlternatePartNumbersStr %></span>
        </div>
        <div class="CatalogProductDetailLongDescription">
            <p><%# LongDescriptionstr%> </p>
        </div>
        <div id="divTechInfo" runat="server" Visible="false" class="CatalogProductDetailTechnicalInformation">
            <h4 class="CatalogProductDetailTechnicalInformationLabel"><%# TechnicalInformationLabelText %></h4>
            <p><%# TechnicalInformationstr %></p>
        </div>
    </div>

    <div class="col-xs-7" id="detailPricingControl">
        <div>
            <uc1:CatalogPricingControl_Detail ID="addToCartBtn" runat="server" Item_ID='<%# Item_ID %>'
                ButtonCss="CatalogProductDetailButton" AccButtonCss="CatalogAccessoryAddButton" />
        </div>
        <div>
            <uc1:CatalogOnHandQuantityDisplayControl ID="OnHandQuantityDisplay" runat="server"
                Item_ID='<%# Item_ID %>' OnHandDisplayCssClass="OnHandQuantityItemDetail" />
        </div>
    </div>
</div>
<div style="clear: both;"></div>
<div id="ItemSpecificationLink" runat="server">
    <p class="CatalogProductDetailQtyPricing">
        <uc1:CatalogItemQuantityDiscountDisplay ID="CatalogItemQuantityDiscountDisplay1" runat="server" />
    </p>
</div>

<asp:ValidationSummary ID="valSum" runat="server" DisplayMode="BulletList" ShowMessageBox="true"
    ShowSummary="false" HeaderText="The Following Errors have occurred" />



Inheritance Hierarchy

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

See Also

Reference

CatalogItemDetailControl Members
Dovetail.Ecommerce.Controls Namespace