How to Hide the Description on the Product Page of the Retail Site (294194)
The information in this article applies to:
- Microsoft Commerce Server 2000
This article was previously published under Q294194 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
Modification Type: | Major | Last Reviewed: | 2/25/2004 |
---|
Keywords: | kbinfo KB294194 |
---|
|