Partilhar via


Images Viewer Web Part

The Image Viewer Web Part is responsible for the display of one or more product images. At minimum, this Web Part displays the main image for the product (selectable from the Property Picker if not determinable from metadata) with minimal required configuration options. For a more complex and complete method of rendering an image, or rendering multiple product images, use the Product Details Web Part. The Product Details Web Part consumes an XSL template where site designers can derive and render an image or multiple images how they want.

You can select available properties to use through a pick list that is arranged to provide an HTML image property. You can supply default values for the display of the image in the absence of data from the catalog.

You can map each image property to a Commerce Server 2009 property. You click any of the buttons next to each customizable image property to enable this mapping. When you click one of the buttons, the appropriate pop-up appears for you to select a property. You can input default settings for the image height and width.

You can use this Web Part instead of the Product Details Web Part (which uses an XSLT template to control the image presentation) to have more flexibility in the presentation of the image.

Properties

The following table lists the properties that you can define for the Image Viewer Web Part.

Property

Type

Description

Default value

ImageAltText

String

Property to which the image alternate text is mapped.

None

ImageFilename

String

Property to which the image file name is mapped.

None

ImageHeight

String

Property to which the image height is mapped.

None

ImageWidth

String

Property to which the image width is mapped.

None

DefaultImageAltText

String

Default image alternate text.

None

DefaultImageFilename

String

Default file name of the image to retrieve for display in the main display image.

None

DefaultImageHeight

Integer

Default image height.

100

DefaultImageWidth

Integer

Default image width.

100

ImageLocation

String

Base URL fragment representing the folder location of the catalog images from which to retrieve the images.

None

TableClassName

String

Cascading style sheet class name to apply to the table containing the main display image.

Empty

Customization

You can customize the Image Viewer Web Part by using the ImageViewerControl.ascx tool.

Error Handling

The Image Viewer Web Part requires a product ID in the query string. When a product ID is not found, the Web site provides the shopper with a message in the place of the image display.

API Dependencies

There are no API dependencies for this Web Part, although it does interact with the Product Query Web Part.

See Also

Other Resources

Developing with SharePoint Commerce Services

Catalog System Web Parts

Working With the Image Viewer Web Part

Product Details Web Part