You are currently offline, waiting for your internet to reconnect

FIX: The Commerce Server 2009 Product Provider Web Part does not include all product relationships

Consider the following scenario in Microsoft Commerce Server 2009:
  • You define certain product relationships for a product in Commerce Server 2009 Catalog Manager.
  • You open a Commerce Server SharePoint site and then locate the product.
  • On the Product Provider Web Part, you change the Web Part and then select the Include Relationships check box.
In this scenario, the relationships that are defined for the product are not displayed.
This problem occurs because of an error in the Product Provider Web Part of Commerce Server 2009.

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: - Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.


You must have Commerce Server 2009 installed to apply this hotfix.

Installation instructions

To apply this hotfix, you have to change the server configuration and the presentation files. After you make these changes, you can use the Product Provider Web Part to display all the relationships that you define for the product. If you use the Extensibility Kit to customize the Web Parts, you can use the source files in this hotfix to display all the product relationships.

This hotfix updates the following source files:
  • Common\Controllers\CatalogController.cs
  • Ui\Catalog\Business\ProductXml.Cs
  • Ui\Catalog\WebParts\ProductQuery\ProductQuery.cs
  • Ui\Catalog\WebParts\ProductDetails\ProductDetails.cs
To view these changes, compare the updated files to the original files that are in the Extensibility Kit.

Note You can locate the Extensibility Kit in the following location:
%Program Files%\Microsoft Commerce Server 2007\Microsoft Commerce Server 2009\Sdk\Samples\

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
File nameFile versionFile sizeDateTimePlatform
Microsoftcommercewebparts.wspNot applicable692,83015-Jul-200922:16Not applicable

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
By default, the Commerce Server 2009 Foundation API lets you retrieve the CrossSell relationship and the UpSell relationship. Therefore, additional relationships types are not displayed.

This hotfix enables you to retrieve additional relationship types by changing the ChannelConfiguration.Config file and the MetadataDefinitions.xml file to redefine the operation sequence components.

In the following example, you create the MyRelationship relationship in Catalog Manager. To retrieve the relationship, you must configure an operation sequence component in the ChannelConfiguration.Config file. Then, you must update the MetadataDefinitions.xml file.

To do this, follow these steps:
  1. Open the ChannelConfiguration.config file and then locate the CommerceQueryOperation_Product operation sequence. Notes
    • The ChannelConfiguration.config file is located in the following directory:
      %Inetpub%\wwwroot\wss\VirtualDirectories\<Port number>
    • When you use SharePoint Commerce Services, you must update these files for each site.
  2. Copy the Up-Sell Provider operation sequence component. Then, paste it immediately after the Up-Sell Provider. Change the component name to the My Relationship Provider value for the relationship that you want to retrieve.
  3. Change the CommerceServerRelationshipConfiguration element so that it can find the CrossSell relationship and the UpSell relationship. To do this, change the value of the CommerceServerRelationshipName property to "MyRelationship."
  4. Change the InternalRelationshipName property to the name of the relationship that you want to use when you query the Commerce Server 2009 Foundation API. This name will also be used to create the child element collection that contains the relationship results in the query response.

    Note You can use different strings for these properties. For example, in the AdventureWorks Catalog, you can find the CrossSell relationship in Catalog Manager. However, calls from SharePoint Web parts specify "CrossSells." After you make these changes, your new configuration section should resemble the following:
    <Component name="My Relationship Provider" type="Microsoft.Commerce.Providers.Components.ProductCommerceServerRelationshipProcessor, Microsoft.Commerce.Providers, Version=, Culture=neutral,PublicKeyToken=31bf3856ad364e35">    <Configuration    customElementName="CommerceServerRelationshipConfiguration" customElementType="Microsoft.Commerce.Providers.Components.CommerceServerRelationshipConfiguration, Microsoft.Commerce.Providers, Version=, Culture=neutral,PublicKeyToken=31bf3856ad364e35">        <CommerceServerRelationshipConfiguration commerceServerRelationshipName="MyRelationship" internalRelationshipName="MyRelationship"/>    </Configuration></Component>
  5. Open the MetaDateDefinition.xml file that is located in the diretory that was mentioned in step 1.
  6. Scroll to the Product Definition section.

    Note This section starts with "<CommerceEntity name="Product">."
  7. Find the CrossSells relationship element and then add a second copy of the CrossSells relationship element. . After you have done this, the product definition section will resemble the following:
    <Relationship name="MyRelationship" type="CatalogRelationship" modelName="HierarchicalCatalogEntity" isMultipleItems="true" >    <DisplayName value="MyRelationship Products">                  </DisplayName>    <Description value=" MyRelationship Products">                  </Description></Relationship>
  8. Enable the display of relationships on the Product Provider Web part or on the Product Query Web part. To do this, select the Include Relationships check box on the Web part that you are using.
  9. Update the transforms that are being used to display the output of Product Query and Product Details. The XML feed into the transform engine now contains an XML element collection that is named MyRelationship. The following example shows a transform based on the CrossSell transformation:
    <xsl:stylesheet version="1.0" xmlns:xsl="">  <xsl:output method="html" version="1.0" indent="yes" />  <xsl:param name="_category" />  <xsl:param name="DefaultImagesRepository" />  <xsl:param name="_catalog" />  <xsl:template match="/">    <xsl:apply-templates select="products/product/MyRelationship" />  </xsl:template>  <xsl:template match="products/product/MyRelationship">    <div class="ms-bold">My Relationship Items</div>    <br />    <table>      <tr>        <td>          <xsl:apply-templates select="product|category" />        </td>      </tr>    </table>…

For more information about Product Provider Web Part, visit the following Microsoft Developer Network (MSDN) Web site:For more information about the Product Details Web Part, visit the following Microsoft Web site:For more information about extensibility and customization, visit the following Microsoft Web site:

Article ID: 971377 - Last Review: 04/28/2010 05:30:57 - Revision: 2.3

Microsoft Commerce Server 2009 Enterprise, Microsoft Commerce Server 2009 Standard

  • kbexpertiseadvanced kbfix kbhotfixserver kbautohotfix kbsurveynew kbqfe KB971377