Page 1 of 1

Item Summary in Featured Products Control

Posted: Mon Oct 27, 2008 1:52 am
by djbuell
Shouldn't the "Item Summary" show in the Featured Products?

Similar to the display of items in the category grid.

DJ

Re: Item Summary in Featured Products Control

Posted: Mon Oct 27, 2008 5:23 am
by mazhar
You can do this job very easily. You just need to add a

Code: Select all

<%Eval(Summary)%>
statement in the datalist. For example edit the ConLib/FeaturedProdcutsGrid.ascx file and replace the ProductList with the below code.

Code: Select all

<asp:DataList ID="ProductList" runat="server" RepeatColumns="2" RepeatDirection="Horizontal" Width="100%" 
    OnItemDataBound="ProductList_ItemDataBound" DataKeyField="ProductId" ItemStyle-CssClass="rowSeparator" 
    SeparatorStyle-CssClass="itemSeparator" ItemStyle-VerticalAlign="bottom">
    <ItemTemplate>
	    <div class="featuredProductContainer">
        <table width="100%" cellspacing="0" cellpadding="0" class="productsGrid">
            <tr>
                <td align="center" valign="top" class="thumbnail">
                    <asp:HyperLink ID="ThumbnailLink" runat="server" NavigateUrl='<%#Eval("NavigateUrl")%>'><asp:Image ID="Thumbnail" runat="server" SkinID="Thumbnail" ImageUrl='<%#GetThumbnailUrl(Eval("ThumbnailUrl"))%>' AlternateText='<%#Eval("ThumbnailAltText")%>' Visible='<%#!string.IsNullOrEmpty((String)Eval("ThumbnailUrl")) %>' /></asp:HyperLink>
                </td>
                <td align="left" valign="bottom" class="details">
                    <p class="detailsInnerPara"><asp:HyperLink ID="NameLink" runat="server" CssClass="highlight" Text='<%# Eval("Name") %>' NavigateUrl='<%#Eval("NavigateUrl")%>'></asp:HyperLink><br />
                    <asp:Label ID="ManufacturerLabel" runat="server" Text='<%# Eval("Manufacturer.Name") %>'></asp:Label><br />
                    <div id="RatingImage" runat="server" visible='<%#Token.Instance.Store.Settings.ProductReviewEnabled != CommerceBuilder.Users.UserAuthFilter.None %>'>
                        <asp:Image ID="Rating" runat="server" ImageUrl='<%#GetRatingImage(Container.DataItem)%>' /><br />
                    </div>
                    </p>
                    <p class="highlight">
					<!--- Retail: <span style="text-decoration: line-through"><asp:Label ID="Msrp" runat="server" CssClass="old_price" Visible="false"></asp:Label></span> ---> 
					<uc:ProductPrice ID="ProductPrice" runat="server" Product='<%#Container.DataItem%>' PriceLabel="Price: "></uc:ProductPrice>
                    <asp:HyperLink ID="MoreInfoLink" runat="server" visible="False" NavigateUrl='<%#Eval("NavigateUrl")%>'><asp:Image ID="MoreInfoImage" runat="server" SkinID="MoreDetailsButton" AlternateText='<%# Eval("Name", "More about {0}") %>' /></asp:HyperLink>
                   
            	</td>
            </tr>
            
            <tr>
            <td colspan="2" style="padding:5px;">
            <%#Eval("Summary") %>
            </td>
            </tr>
            
            <tr>
            <td colspan="2">
            <div style="margin-top:10px"><uc:AddToCartLink ID="AddToCartLink1" runat="server" ProductId='<%#Eval("ProductId")%>' /></div>
            </td>
            </tr>
        </table></div>
    </ItemTemplate>
    <SeparatorTemplate></SeparatorTemplate>
    <SeparatorStyle CssClass="itemSeperator" />
</asp:DataList>
This change will made summary available in the featured products grid.