Display thumbnail in CategoryListPage.aspx

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
BBHartley
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 39
Joined: Tue Nov 18, 2008 11:49 am

Display thumbnail in CategoryListPage.aspx

Post by BBHartley » Sat Jul 18, 2015 3:34 pm

I am finishing an upgrade from 7.01 to the newest version of Gold. Our old CategoryListPage columns had been changed to include the thumbnail. The AdvancedSearch.aspx search result gives me what I want the final output to be, but I am having trouble setting up my custom CategoryListPage. Can anyone provide insight on how to do this? It was seven years ago when I did it the first time... I simply want the SKU column to be replaced with a Thumbnail column.

Thanks in advance for any help provided.

bbhartley

rmaweb
Commander (CMDR)
Commander (CMDR)
Posts: 118
Joined: Fri Sep 10, 2010 9:41 am

Re: Display thumbnail in CategoryListPage.aspx

Post by rmaweb » Tue Jul 21, 2015 4:06 am

Hello BBHartley,

Sorry for the delay in responding. First chance I've had to be at my office computer. Give this a shot:

In /ConLib/CategoryListPage.ascx

Find:

Code: Select all

				                    <th scope="col" class="sku">SKU</th>
				                    <th scope="col" class="itemName" >Name</th>
Replace With:

Code: Select all

				                    <th scope="col" class="itemName"  colspan="2">Name</th>
Find:

Code: Select all

                                <td class="sku">
                                    <asp:Label ID="ProductSku" runat="server" CssClass="sku"></asp:Label>
                                </td>
Replace With:

Code: Select all

                                <td class="itemThumbnail">
                                    <asp:HyperLink ID="ProductThumbnailLink" runat="server" NavigateUrl="#">
                                        <asp:Image ID="ProductThumbnailImage" runat="server" CssClass="itemThumbnail" />
                                    </asp:HyperLink>
                                </td>
In /ConLib/CategoryListPage.ascx.cs

Find:

Code: Select all

                Label productSku = (Label)e.Item.FindControl("ProductSku");
                productSku.Text = product.Sku;
Replace With:

Code: Select all

                HyperLink ProductThumbnailLink = (HyperLink)e.Item.DataItem;
                Image ProductThumbnailImage = (Image)e.Item.DataItem;
                ProductThumbnailLink.NavigateUrl = product.NavigateUrl;
                ProductThumbnailImage.ImageUrl = product.ThumbnailUrl;
                ProductThumbnailImage.AlternateText = product.ThumbnailAltText;
I put in the CSS classes for the table cell and image, but they don't exist anywhere. If you need to do any formatting, you will need to open the Styles.Less file in your theme folder and make whatever changes needed.
Ryan A.
Scott's Bait and Tackle
http://store.scottsbt.com
Work In Progress
Able Gold R10
Bootstrap 3.3

Post Reply