CyberStore Documentation
New and Modified Controls
In This Topic

The following CyberStore e-commerce Controls have been added or modified in the 2.18.3 release:

New Controls

There are no new controls in this version.

Modified Controls

The control markup for the following controls have been modified in this version.

If you use the standard CyberStore controls within your web store, these are automatically updated with your installation of version 2.18.3. However, if you have a custom version of any of the controls listed, you must make the following changes to the control markup to maintain full functionality. For the markup of each control, you only need to adjust the text from version 2.18.2 that changes in version 2.18.3, as listed below. The placement of that text within the markup and the surrounding text remain the same.

Modified Control

Classification

Description of Modification
CatalogAccessorySelectionGrid.ascx

Required

Purpose: Add the ability to see accessory quantities in the shopping cart.

Modification #1: Remove unused registered controls:

  • From 2.18.2:
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CatalogAccessorySelectionGrid.ascx.cs" Inherits="Dovetail.Ecommerce.Controls.CatalogAccessorySelectionGrid" %>
    <@ Register TagPrefix="uc1" TagName="CatalogPricingControl" Src="~/Control/CatalogPricingControl.ascx" >

    <@ Register TagPrefix="uc1" TagName="CatalogUnitPriceControl" Src="~/Control/CatalogUnitPriceControl.ascx" >
    <@ Register TagPrefix="uc1" TagName="CatalogItemImageControl" Src="~/Control/CatalogItemImageControl.ascx" >

                       
  • To 2.18.3:
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CatalogAccessorySelectionGrid.ascx.cs" Inherits="Dovetail.Ecommerce.Controls.CatalogAccessorySelectionGrid" %>

Modification #2: Insert UserQuantity column into dxgrdAccesories data grid:

  • From 2.18.2:
    <dx:GridViewCommandColumn CellStyle-CssClass="accessories_grid_checkbox" Name="SelectionColumn"
        ShowSelectCheckbox="true" Caption=" ">
    </dx:GridViewCommandColumn>
    <dx:GridViewDataTextColumn CellStyle-CssClass="accessories_grid_option_name" FieldName="XPItem.Name"
        Caption=" " ReadOnly="true">
        <Settings AllowSort="False" AllowDragDrop="False" />
    </dx:GridViewDataTextColumn>


    <@ Register TagPrefix="uc1" TagName="CatalogItemImageControl" Src="~/Control/CatalogItemImageControl.ascx" >

                       
  • To 2.18.3:
    <dx:GridViewCommandColumn CellStyle-CssClass="accessories_grid_checkbox" Name="SelectionColumn"
        ShowSelectCheckbox="true" Caption=" ">
    </dx:GridViewCommandColumn>
    <dx:GridViewDataTextColumn FieldName="UserQuantity" Caption="Quantity" ReadOnly="false" Width="70">

        <DataItemTemplate>

            <dx:ASPxTextBox ID="AccessoryQtyBox" runat="server" Width="45" MaxLength="6" OnInit="AccessoryQtyBox_Init"

                CssClass="qtyFormField" HeaderStyle-HorizontalAlign="Center" Native="true"  CaptionSettings-VerticalAlign="Bottom"/>

        </DataItemTemplate>

        <Settings AllowSort="False" AllowDragDrop="False" />


    </dx:GridViewDataTextColumn>
    <dx:GridViewDataTextColumn CellStyle-CssClass="accessories_grid_option_name" FieldName="XPItem.Name"
        Caption=" " ReadOnly="true">
        <Settings AllowSort="False" AllowDragDrop="False" />
    </dx:GridViewDataTextColumn>
CatalogAvailableToPromiseReportControl.ascx Recommended

Purpose: Add support for ATP ship date ranges, and introduce ability to Export the ATP report to Excel.

Modification: Replace the entirety of the <script></script> section.

  • From 2.18.2:
    Copy Code
    <script type="text/javascript">
        $(function () {
        var Params = {};
            MakeAJAXCall("Inventory.GetATPReportData", Params, BindTreeList);
        });
        function BindTreeList(DATA)
        {
            $("#ATPTreeList").dxDataGrid({
                dataSource: JSON.parse(DATA),
                columns: [<%= CategoryDataGridJS %>],
                masterDetail: {
                    enabled: true,
                    template: function (container, info) {
                        var DataSource = info.data;
                        $("<div>")
                            .text(<%= CategoryDetailCaptionJS %>)
                            .appendTo(container);
                        $('<div>').dxDataGrid({
                            columns: [<%= ItemDataGridJS %>],
                            dataSource : DataSource.Items
                        }).appendTo(container);
                    }
                },
                onRowClick: function (e) {
                    if (e.isExpanded) {
                        e.component.collapseRow(e.key);
                    }
                    else {
                        e.component.expandRow(e.key);
                    }
                }
            });
        }
    </script>
    

 

  • To 2.18.3:
    Copy Code
    <script type="text/javascript">
        $(function () {
        var Params = {};
            MakeAJAXCall("Inventory.GetATPReportData", Params, flattenData);
        });
        // global variable to hold the AJAX data as a flattend copy
        var allATPData_flat = [];
        // function to flatten out the returned data from the AJAX call
        var flattenData = function(DATA) {
            var flatData = JSON.parse(DATA);                    // parse returned data
            flatData.forEach(function(catWithItems) {           // loop through all categories
            catWithItems.Items.forEach(function(items) {        // loop through all items in each catgory
                    var catSingleStockCode = {                  // slimmed data to push into our flattened array
                        Name: catWithItems.Name,
                        StockCode: items.StockCode,
                        ItemName: items.ItemName,
                        ATP: items.ATP,
                        ATPAvailable: items.ATPAvailable
                    }
                    // creates a 'clone' of the object to push into the array,
                    // otherwise we would only get a reference to the obj
                    var pushCopy = Object.assign({}, catSingleStockCode)    
                    allATPData_flat.push(pushCopy);
                })
            })
            BindTreeList();
                    }
        function BindTreeList() {
            // setup variables to create data stamp on file name
            var today = new Date();
            var yyyy = today.getFullYear();
            var mm = String(today.getMonth() + 1).padStart(2, '0');
            var dd = String(today.getDate()).padStart(2, '0');
            var atpGrid = $("#ATPTreeList").dxDataGrid({
                dataSource: allATPData_flat,
                export: {
                    enabled: true,
                    allowExportSelectedData: true,
                    fileName: 'FullATP_Report_' + yyyy + '_' + mm + '_'  + dd
                },
                selection: {
                    allowSelectAll: true,
                    mode: 'multiple',
                    deferred: false,
                    selectAllMode: 'allPages',
                    showCheckBoxesMode: "always"
                },
                grouping: {
                    autoExpandAll: false,
                },
                showBorders: true,
                columns: [ <%= CategoryDataGridJS + ItemDataGridJS %> ],
                onRowClick: function (e) {
                    if (e.isExpanded) {
                        e.component.collapseRow(e.key);
                    }
                    else {
                        e.component.expandRow(e.key);
                    }
                },
                onExporting: function(e) {
                    // adding category column for user sorting
                    e.component.beginUpdate();
                    e.component.addColumn({dataField: "Name", caption: 'Category'});
                    e.component.endUpdate();
                },
                onExported: function(e) {
                    //remove added column from page
                    e.component.beginUpdate();
                    e.component.deleteColumn('Category');
                    e.component.endUpdate();
                }
            });
        }
    </script>
    

CatalogPricingControl.ascx,
CatalogPricingControl_Detail.ascx,
CatalogPricingControl_Feature.ascx,
CatalogPricingControl_RelatedItems.ascx,
CatalogPricingControl_TileListing.ascx

Required

Purpose: Add the ability to see and adjust accessory quantities in the shopping cart.

Modification: Insert UserQuantity column into dxgrdAccesories data grid:

  • From 2.18.2:
    <dx:GridViewCommandColumn CellStyle-CssClass="accessories_grid_checkbox" Name="SelectionColumn"
        ShowSelectCheckbox="true" Caption=" ">
    </dx:GridViewCommandColumn>
    <dx:GridViewDataTextColumn CellStyle-CssClass="accessories_grid_option_name" FieldName="XPItem.Name"
        Caption=" " ReadOnly="true">
        <Settings AllowSort="False" AllowDragDrop="False" />
    </dx:GridViewDataTextColumn>
                      

                       
  • To 2.18.3:
    <dx:GridViewCommandColumn CellStyle-CssClass="accessories_grid_checkbox" Name="SelectionColumn"
        ShowSelectCheckbox="true" Caption=" ">
    </dx:GridViewCommandColumn>
    <dx:GridViewDataTextColumn FieldName="UserQuantity" Caption="Quantity" ReadOnly="false" Width="70">

        <DataItemTemplate>

            <dx:ASPxTextBox ID="QtyBox" runat="server" Width="45" MaxLength="6" OnInit="QtyBox_Init"

                CssClass="qtyFormField" HeaderStyle-HorizontalAlign="Center" Native="true"  CaptionSettings-VerticalAlign="Bottom"/>

        </DataItemTemplate>

        <Settings AllowSort="False" AllowDragDrop="False" />

    </dx:GridViewDataTextColumn>
    <dx:GridViewDataTextColumn CellStyle-CssClass="accessories_grid_option_name" FieldName="XPItem.Name"
        Caption=" " ReadOnly="true">
        <Settings AllowSort="False" AllowDragDrop="False" />
    </dx:GridViewDataTextColumn>
CustomerChangeRequestShipDateControl.ascx

Required

Purpose: Add optional support for requested ship date range selection.

Modification: Replace entire ASPxButton and ASPxPopupControl sections:

  • From 2.18.2:
    <dx:ASPxButton ID="btnChangeDate" runat="server" ClientIDMode="Static" AutoPostBack="false" CssClass="ChangeRequestShipDateButton" Text="Change" ClientSideEvents-Click="function(s,e){pcRequestedShipDateForm.Show();}" Visible="false" />
    <dx:ASPxPopupControl ID="pcRequestedShipDateForm" runat="server" Modal="true" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" ClientIDMode="Static" ClientInstanceName="pcRequestedShipDateForm" PopupAnimationType="None" EnableViewState="False" ShowCloseButton="false" ShowHeader="false" CloseAction="None" >
        <ContentCollection>
            <dx:PopupControlContentControl runat="server">
                <dx:ASPxPanel ID="Panel1" runat="server">
                    <PanelCollection>
                        <dx:PanelContent runat="server">
                            <dx:ASPxDateEdit ID="dateEdit" runat="server" ClientIDMode="Static" ClientInstanceName="dateEdit" Width="190" Caption="Requested Ship Date" OnInit="dateEdit_Init" NullText="MM/DD/YYYY" EditFormatString="MM/dd/yyyy" DisplayFormatString="MM/dd/yyyy" >
                            </dx:ASPxDateEdit>
                            <dx:ASPxButton ID="btnSubmitDate" runat="server" ClientIDMode="Static" ClientInstanceName="btnSubmitDate" Text="Submit" AutoPostBack="false" OnClick="btnSubmitDate_Click" />
                        </dx:PanelContent>
                    </PanelCollection>
                </dx:ASPxPanel>
            </dx:PopupControlContentControl>
        </ContentCollection>
    </dx:ASPxPopupControl>
                         
                        
  • To 2.18.3:
    <dx:ASPxButton ID="btnChangeDate" runat="server" ClientIDMode="Static" AutoPostBack="false" CssClass="ChangeRequestShipDateButton"
        ClientSideEvents-Click="function(s,e){popRequestedShipDateForm.Show();}" Visible="false" />
    <dx:ASPxPopupControl ID="popRequestedShipDateForm" runat="server" Modal="true" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" ClientIDMode="Static"
        ClientInstanceName="popRequestedShipDateForm" PopupAnimationType="None" EnableViewState="False" CloseAction="CloseButton" >
        <ContentCollection>
            <dx:PopupControlContentControl runat="server">
                <dx:ASPxPanel ID="Panel1" runat="server">
                    <PanelCollection>
                        <dx:PanelContent runat="server">
                            <p>
                                <dx:ASPxLabel ID="lblRequestedShipDateInstructions" runat="server" />
                            </p>
                            <dx:ASPxDateEdit ID="dateEdit" runat="server" ClientIDMode="Static" ClientInstanceName="dateEdit" Width="190" OnInit="dateEdit_Init" OnCalendarCustomDisabledDate="dateEdit_CalendarCustomDisabledDate"  
                                Caption="Requested Ship Date" CaptionSettings-Position="Top" NullText="MM/DD/YYYY" DisplayFormatString="MM/dd/yyyy" EditFormatString="MM/dd/yyyy"
                                ClientSideEvents-ValueChanged="function(s,e){if(s.GetValue() != null){btnSubmitDate.SetEnabled(true);}}" />
                            <br />
                            <dx:ASPxDateEdit ID="dateEditEnd" runat="server" ClientIDMode="Static" ClientInstanceName="dateEditEnd" Width="190" OnInit="dateEditEnd_Init" OnCalendarCustomDisabledDate="dateEditEnd_CalendarCustomDisabledDate"
                                Caption="Requested End Date" CaptionSettings-Position="Top" NullText="MM/DD/YYYY" DisplayFormatString="MM/dd/yyyy" EditFormatString="MM/dd/yyyy"
                                ClientSideEvents-ValueChanged="function(s,e){if(s.GetValue() != null && dateEdit.GetValue() != null){btnSubmitDate.SetEnabled(true);}}" >
                                <DateRangeSettings StartDateEditID="dateEdit" />
                            </dx:ASPxDateEdit>
                            <br />
                            <dx:ASPxButton ID="btnSubmitDate" runat="server" ClientIDMode="Static" ClientInstanceName="btnSubmitDate" Text="Submit" AutoPostBack="false" OnClick="btnSubmitDate_Click" ClientEnabled="false" CssClass="btnCart" />
                        </dx:PanelContent>
                    </PanelCollection>
                </dx:ASPxPanel>
            </dx:PopupControlContentControl>
        </ContentCollection>
    </dx:ASPxPopupControl>
CustomerLoginControl.ascx

Required

Purpose: Updates to centralize requested ship date pop-up when using ATP.

Modification #1: Register the CustomerChangeRequestShipDateControl:

  • From 2.18.2:
    <%@ Register TagPrefix="uc1" TagName="CommonRequiredPasswordControl" Src="~/Control/CommonRequiredPasswordControl.ascx" %>
                       
  • To 2.18.3:
    <%@ Register TagPrefix="uc1" TagName="CommonRequiredPasswordControl" Src="~/Control/CommonRequiredPasswordControl.ascx" %>
    <%@ Register TagPrefix="uc1" TagName="CustomerChangeRequestShipDateControl" Src="~/Control/CustomerChangeRequestShipDateControl.ascx" %>

Modification #2: Replace the ASPxPopupControl with the registered CustomerChangeRequestShipDateControl:

  • From 2.18.2:
    <dx:ASPxPopupControl ID="pcRequestedShipDateForm" runat="server" Modal="true" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" ClientIDMode="Static" ClientInstanceName="pcRequestedShipDateForm" PopupAnimationType="None" EnableViewState="False" ShowCloseButton="false" ShowHeader="false" CloseAction="None" >
        <ContentCollection>
            <dx:PopupControlContentControl runat="server">
                <dx:ASPxPanel ID="Panel1" runat="server">
                    <PanelCollection>
                        <dx:PanelContent runat="server">
                            <dx:ASPxDateEdit ID="dateEdit" runat="server" ClientIDMode="Static" ClientInstanceName="dateEdit" Width="190" Caption="Requested Ship Date" NullText="MM/DD/YYYY" DisplayFormatString="MM/dd/yyyy" EditFormatString="MM/dd/yyyy" ClientSideEvents-ValueChanged="function(s,e){if(s.GetValue() != null){btnSubmitDate.SetEnabled(true);}}">
                            </dx:ASPxDateEdit>
                            <dx:ASPxButton ID="btnSubmitDate" runat="server" ClientIDMode="Static" ClientInstanceName="btnSubmitDate" Text="Submit" AutoPostBack="false" OnClick="btnSubmitDate_Click" ClientEnabled="false" />
                        </dx:PanelContent>
                    </PanelCollection>
                </dx:ASPxPanel>
            </dx:PopupControlContentControl>
        </ContentCollection>
    </dx:ASPxPopupControl>

                       
  • To 2.18.3:
    <uc1:CustomerChangeRequestShipDateControl ID="CustomerChangeRequestShipDateControl1" runat="server" />

 

Implementer's Note:

If you have custom versions of the above modified Controls in your Site/Control folder, please compare them with their released versions in the /ecommerce/Control folder for compatibility.

See Also

Version 2.18 Maintenance Releases