Rank: Member
Joined: 1/28/2013(UTC) Posts: 77 Location: Midlothian, TX
|
Where do I set the Popup size for the Additional Images? Based on my image sizes it is defaulting just a tad bit small and cutting off the other additional images.
Thanks |
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Dan,
Take a look at /App_Code/ViewUtilities.vb around line 290. There are two variables, "w" and "h" (width and height, respectively), which control the pop-up dimensions. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 1/28/2013(UTC) Posts: 77 Location: Midlothian, TX
|
Thanks. I'll check it out tonight. |
|
|
|
|
Rank: Member
Joined: 10/11/2006(UTC) Posts: 162
Thanks: 1 times
|
Not to highjack this thread, but is there any way to use an Additional Image (we use it for the large image) on the single product item pages? Since there are only fields for small and med size images, we use the additional images field to hold the large version and want to start using that image as the main product photo. If not, we'll just resize our images but figured I would check here first.
Thanks, Greg
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Originally Posted by: [email protected] ...is there any way to use an Additional Image (we use it for the large image) on the single product item pages? Yes, but please note that if you are using Choices (not Modifiers) and use a different medium image for each choice combination it will no longer display when a user makes their selection. You also won't be able to force the image size since there is no "large" size defined in the admin like there is for small and medium images. Make a backup copy of /BVModules/Controls/ProductMainImage.ascx.vb and then copy/paste the code below into the file, replacing everything. Disclaimer: I have not tested this code. :) Code:
Imports BVSoftware.Bvc5.Core
Partial Class BVModules_Controls_ProductMainImage
Inherits System.Web.UI.UserControl
Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
If TypeOf Me.Page Is BaseStoreProductPage Then
Dim product As Catalog.Product = DirectCast(Me.Page, BaseStoreProductPage).LocalProduct
If product IsNot Nothing Then
' if we have a choice combination product, get the parent product
If Not String.IsNullOrEmpty(product.ParentId) Then
product = Catalog.InternalProduct.FindByBvin(product.ParentId)
End If
If product.AdditionalImages.Count = 0 Then
' if there no additional images, continue to use the medium image
Me.imgMain.ImageUrl = Me.Page.ResolveUrl(Utilities.ImageHelper.GetValidImage(product.ImageFileMedium, True))
Me.imgMain.AlternateText = HttpUtility.HtmlEncode(product.ImageFileMediumAlternateText)
' Force Image Size (since it's a medium-sized image)
ViewUtilities.ForceImageSize(imgMain, imgMain.ImageUrl, ViewUtilities.Sizes.Medium, Me.Page)
Else
' show the first additional image on the product page
Me.imgMain.ImageUrl = Me.Page.ResolveUrl(Utilities.ImageHelper.GetValidImage(product.AdditionalImages(0).FileName, True))
Me.imgMain.AlternateText = HttpUtility.HtmlEncode(product.AdditionalImages(0).AlternateText)
' if we have more than one additional image, show the 'more images' button
If product.AdditionalImages.Count > 1 Then
Me.AdditionalImagesLink.Visible = True
Me.AdditionalImagesLink.Style.Add("cursor", "pointer")
Me.AdditionalImagesLink.Attributes.Add("onclick", ViewUtilities.GetAdditionalImagesPopupJavascript(product.Bvin, Me.Page))
End If
End If
End If
End If
End Sub
End Class
Edited by user Monday, March 11, 2013 9:33:01 PM(UTC)
| Reason: Not specified |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 10/11/2006(UTC) Posts: 162
Thanks: 1 times
|
Thanks, Aaron! I'll give it a shot. Very much appreciate the assistance.
Greg
|
|
|
|
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.