• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

davebar000
#1 Posted : Thursday, December 27, 2007 10:51:19 AM(UTC)
davebar000

Rank: Member

Joined: 12/30/2006(UTC)
Posts: 65

Hey Gang,

Has anyone adjusted the Product Grid to Display the Large Product image instead of the small?

I Have a copy of the original product grid (named differently) and have it appearing on the site.
This specific grid, I'd like to show the larger image size.

I tried to modify this line in the view.ascx.vb file by changing small to medium, but that wasn't enough
Dim smallimage As HtmlImage = DirectCast(e.Item.FindControl("imagesmall"), HtmlImage)

this is the matching line on the view.ascx file:
<asp:HyperLink ID="lnkImage" runat="server"><img id="imagesmall" runat="server" class="lastproductsviewed"/></asp:HyperLink>

I reviewed the code in the Product template, and the Sub Category 2 template, but it seems more involved in those and can't figure out how to make use of that code for my task.

Any advice would be a great help.
Thanks
-Dave
davebar000
#2 Posted : Wednesday, January 2, 2008 2:31:34 PM(UTC)
davebar000

Rank: Member

Joined: 12/30/2006(UTC)
Posts: 65

Just giving a check in now that the holidays have passed.

If anyone has guidance on how to get the image in the product grid to display the medium image, instead of the small, it would be greatly appreciated.

I attempted to use code found on the product page templates, but I wasn't able to do so correctly.
I was hoping it would be something as quic kas changing the database call from ImageSmall to ImageMedium (whatever the real correct syntax is).

Thanks
-Dave
CorneliuTusnea
#3 Posted : Saturday, January 5, 2008 5:42:05 AM(UTC)
CorneliuTusnea

Rank: Member

Joined: 8/17/2006(UTC)
Posts: 681

David,
You were close with your change. Here is the code you need:

Dim smallimage As HtmlImage = DirectCast(e.Item.FindControl("imagesmall"), HtmlImage)
Dim lnkProduct As HyperLink = DirectCast(e.Item.FindControl("lnkProduct"), HyperLink)
If (lnkImage IsNot Nothing) AndAlso (smallimage IsNot Nothing) Then
smallimage.Src = Page.ResolveUrl(Utilities.ImageHelper.GetValidImage(p.ImageFileMedium, True))
smallimage.Alt = HttpUtility.HtmlEncode(p.ImageFileMediumAlternateText)
lnkImage.NavigateUrl = Utilities.UrlRewriter.BuildUrlForProduct(p, Me.Page.Request)

' Force Image Size
ViewUtilities.ForceImageSize(smallimage, smallimage.Src, ViewUtilities.Sizes.Medium, Me.Page)
...
Regards,
Corneliu.
http://www.bestgames.com.au
http://www.bestchess.com.au



BV Product Links, Details and Signatures: Improve your customer experience:

http://www.acorns.com.au/projects/bv/quicklink/

davebar000
#4 Posted : Sunday, January 13, 2008 7:15:40 PM(UTC)
davebar000

Rank: Member

Joined: 12/30/2006(UTC)
Posts: 65

Cornellu,

Thanks so much for that code!!
I changed the proper items from small to medium (as you displayed), and it worked perfectly.

Very very much appreciated!
-Dave
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012