Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to Hide the Description on the Product Page of the Retail Site


View products that this article applies to.

This article was previously published under Q294194

↑ Back to the top


Summary

The Commerce Server 2000 Solution Sites require a description property in every product that it attempts to display. To hide the description, add a case statement for the description to the Function htmRenderUserDefinedProductProperties in the Product.asp file:
Function htmRenderUserDefinedProductProperties(ByVal rsProperties, ByVal style)
    Dim fldProperty
    Dim sPropertyName
    Dim htmProperty
    Dim nWidth, nHeight
    Dim bShowProperty
	
	' Iterate each property
	For Each fldProperty In rsProperties.Fields
		' Find out if the property can be shown. Do not display empty properties.
		bShowProperty = False
		If Not IsNull(fldProperty.Value) Then
			' Filter out built-in properties. Built-in properties do not have attributes.
			If Not IsNull(MSCSCatalogAttribs.Value(fldProperty.Name)) Then
				If MSCSCatalogAttribs.Value(fldProperty.Name).Value(DISPLAY_ON_SITE_ATTRIBUTE) = True Then
					bShowProperty = True
				End If
			End If
		End If
                If bShowProperty Then
			Select Case UCase(fldProperty.Name)
			  	Case UCase(IMAGE_FILENAME_PROPERTY_NAME)
					nWidth = PeekField(rsProperties, IMAGE_WIDTH_PROPERTY_NAME)
					nHeight = PeekField(rsProperties, IMAGE_HEIGHT_PROPERTY_NAME)
			  		htmProperty = BR & RenderImage(rsProperties.Fields(IMAGE_FILENAME_PROPERTY_NAME).Value, nWidth, nHeight, mscsMessageManager.GetMessage("L_Standard_Image_Description_Text", sLanguage), "") & CRLF
										                        
				Case UCase(PRODUCT_NAME_PROPERTY_NAME), _
				     UCase(IMAGE_WIDTH_PROPERTY_NAME), _
				     UCase(IMAGE_HEIGHT_PROPERTY_NAME)
				    htmProperty = ""  
				
				Case "DESCRIPTION"
					'sPropertyName = sGetPropertyDisplayName(fldProperty.Name)
				    'htmProperty = RenderText(FormatOutput(LABEL_TEMPLATE, Array(sPropertyName)) & fldProperty.Value, MSCSSiteStyle.Body) & BR<BR/>
				Case Else
				    Rem Use DisplayName attribute if it is set, otherwise use PropertyName
					sPropertyName = sGetPropertyDisplayName(fldProperty.Name)
				    htmProperty = RenderText(FormatOutput(LABEL_TEMPLATE, Array(sPropertyName)) & fldProperty.Value, MSCSSiteStyle.Body) & BR
			End Select
			htmRenderUserDefinedProductProperties = htmRenderUserDefinedProductProperties & htmProperty
		End If
	Next
End Function
				

↑ Back to the top


Keywords: KB294194, kbinfo

↑ Back to the top

Article Info
Article ID : 294194
Revision : 3
Created on : 2/25/2004
Published on : 2/25/2004
Exists online : False
Views : 290