Rank: Member
Joined: 2/20/2005(UTC) Posts: 89
|
In 2004.7, the search page shows the product images. The new search in 5 seems to just show a list, and when you click on one you go to the product detail. Can I still get the old style results, or is this the brave new world?
P.S. My weekend of converting my store has been so much better with everybody's support :p
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 2,136
Was thanked: 1 time(s) in 1 post(s)
|
Kevin, It looks like search results are generated by code in Search.aspx.vb. Specifically in the RenderProductCollectionToString function. For example, Code: For Each item As Catalog.Product In c sb.Append("<div class=""searchresultrecord""><a href=""") sb.Append(Utilities.UrlRewriter.BuildUrlForProduct(item, Me.Page.Request)) sb.Append(""">") sb.Append(item.Sku) sb.Append(" - ") sb.Append(item.ProductName) sb.Append("</a></div>") Next
I don't remember what BVC2004.7 did, but you can add the product image fairly easily. Take a look at any one of the Product.aspx.vb files in the BVModules\ProductTemplates folders to see how the various product properties are referenced. For example, the BVC5\Product.aspx.vb template uses the medium image file by referencing the ImageFileMedium property. You can do something similar: Code: For Each item As Catalog.Product In c sb.Append("<div class=""searchresultrecord""><a href=""") sb.Append(Utilities.UrlRewriter.BuildUrlForProduct(item, Me.Page.Request)) sb.Append(""">")
[color=red> ]
<FONT color=red> sb.Append(item.ImageFileMedium)[/color]
[color=red> ][/color] sb.Append(item.Sku) sb.Append(" - ") sb.Append(item.ProductName) sb.Append("</a></div>") Next
Of course you may want to add an alt property and maybe even a title. |
|
|
|
|
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.