NopCommerce 1.60 tested:

I know this is an older post but...I wanted to do the same thing but with the main image.  I'm creating a website that sells nopCommerce templates and at 300px you really can't get an idea of what the layout looks like.  Anyway, here's what I did.  It's a bit more complicated than what suggested in a previous post but it works well for me.

In ProductInfo.ascx.cs comment out all of the code that starts with defaultImage.  Comment out the entire else if block, too.  In the if and else block put the following two lines of code:


lvProductPicture.DataSource = new List<ProductPicture> {product.DefaultProductPicture};
lvProductPicture.DataBind();

Now in ProductInfo.ascx comment out the asp:Image tag and put in the following code right above it:


        <asp:ListView ID="lvProductPicture" runat="server" GroupItemCount="1">
            <LayoutTemplate>
                <table>
                    <asp:PlaceHolder runat="server" ID="groupPlaceHolder"></asp:PlaceHolder>
                </table>
            </LayoutTemplate>
            <GroupTemplate>
                <tr>
                    <asp:PlaceHolder runat="server" ID="itemPlaceHolder"></asp:PlaceHolder>
                </tr>
            </GroupTemplate>
            <ItemTemplate>
                <a href="<%#PictureManager.GetPictureUrl((int)Eval("PictureId"))%>" rel="lightbox-p"
                    title="<%= lProductName.Text%>">
                    <img src="<%#PictureManager.GetPictureUrl((int)Eval("PictureId"), 300)%>" alt="Product image" />
                </a>
            </ItemTemplate>
        </asp:ListView>


That's it.  Gotta love nopCommerce!

Eric Downey
www.nopCommThemes.com