Page 1 of 1

Making "Recently Viewed " with Icons

Posted: Thu Oct 23, 2008 1:03 am
by smcfarland
I didn't see this anywhere...

I love the recently view feature, but it takes up more space than I want to give up... Has anyone changes this to just have the item description, an icon and the price (similar to the mini basket contents)?

If not, I will do it later today and post it.... almost been up 24 hours and I am pooped.

Re: Making "Recently Viewed " with Icons

Posted: Thu Oct 23, 2008 5:58 am
by mazhar
Hopefully you will get it with some CSS changes.

Re: Making "Recently Viewed " with Icons

Posted: Thu Oct 23, 2008 6:15 am
by Robbie@FireFold
I'd like to see this and also "New" items.

Re: Making "Recently Viewed " with Icons

Posted: Thu Oct 23, 2008 7:03 am
by jmestep
I did to just show link it in the RecentlyViewed.ascx by leaving only this section in for display:
<ItemTemplate>
<p>
<b><a href="<%# Page.ResolveClientUrl(Eval("NavigateUrl").ToString()) %>"><%#Eval("Name")%></a></b><br />
</asp:PlaceHolder>
</p>
</ItemTemplate>

New Products- I think I got that from something Joe had posted on the forums. You can take an existing control and change the data source. I'm using the following instead of Featured Products code:
ProductList.DataSource=ProductDataSource.LoadForCriteria("DisablePurchase='0' and VisibilityId=0", 30, 0, "CreatedDate DESC");
30 is the count of products to show.

Re: Making "Recently Viewed " with Icons

Posted: Mon Oct 27, 2008 7:56 am
by smcfarland
Got it.

Go to conlib/RecentlyViewed.ascx.cs

at line 100, you will see:

Code: Select all

                if (!string.IsNullOrEmpty(product.ThumbnailUrl))
                {
                    thumbnail.ImageUrl = product.ThumbnailUrl;
                    thumbnail.Attributes.Add("hspace", "2");
                    thumbnail.Attributes.Add("vspace", "2");
                }
What the code is saying is to look at the PRODUCT table and Check the THUMBNAIL link. You are going to replace both instances of THUMBNAILURL with ICONURL, like this:

Code: Select all

                if (!string.IsNullOrEmpty(product.IconUrl))
                {
                    thumbnail.ImageUrl = product.IconUrl;
                    thumbnail.Attributes.Add("hspace", "2");
                    thumbnail.Attributes.Add("vspace", "2");
                }