How to Modify the Cross-Sell/Up-Sell Relationship Manager

You can modify the Cross-Sell/Up-Sell Relationship Manager so that you can edit any product-category relationship.

After you make the following changes, a button labeled MyTest will be displayed in the Commerce Server Business Administration Ribbon. If you click the MyTest button, you will be able to edit the MyTest relationships.

To modify the Cross-Sell/Up-Sell Relationship Manager

  1. Navigate to the virtual directory of the default web application: c:\inetpub\wwwroot\wss\virtualdirectories\[port of the default web application or host header].

  2. Open the Toolbar.xml file and add the following new element.

<controls:ToolBarModule ConfigFile="MicrosoftCommerceCatalogItemRelationship.xml">
   <controls:ToolBarModule.InitResources>
      <ResourceDictionary>
         <sys:String x:Key="RelationshipToEdit">MyTest</sys:String>
         <sys:String x:Key="OnClick">FloatSilverlight("MyTestEditSilverlight", "/ClientBin/MicrosoftCommerceCatalogItemRelationship.xap", "CatalogItemRelationshipToEdit=MyTest,ResourceFileUris=CsManagementResources.xml MicrosoftCommerceCatalogItemRelationshipResources.xml", 10, 10, 800, 618, 800, 618, true, "App.RequestClose()")</sys:String>
         <mCore:LocalizedValueDictionary x:Key="Label">
            <sys:String x:Key="en-US">Custom Relationship</sys:String>
            <sys:String x:Key="en-CA">Custom Relationship</sys:String>
            <sys:String x:Key="fr-CA">Custom Relationship</sys:String>
         </mCore:LocalizedValueDictionary>
      </ResourceDictionary>
   </controls:ToolBarModule.InitResources>
</controls:ToolBarModule>
  1. Save the file.

  2. Open the ChannelConfiguration.config file.

  3. Add CommerceServerRelationshipProcessor components and specify the relation name in the configuration as shown in the following code sample:

<Component name="MyTest Provider" type="Microsoft.Commerce.SequenceComponents.Components.ProductCommerceServerRelationshipProcessor, Microsoft.Commerce.SequenceComponents, Version=9.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35">
   <Configuration customElementName="CommerceServerRelationshipConfiguration" customElementType="Microsoft.Commerce.SequenceComponents.Components.CommerceServerRelationshipElement, Microsoft.Commerce.SequenceComponents, Version=9.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35">
      <CommerceServerRelationshipConfiguration commerceServerRelationshipName="MyTest" internalRelationshipName="MyTest" />
   </Configuration>
</Component>
  1. Save and close the file.

  2. Open the MetadataDefinitions.xml file and add the new relationship to a product and/or category commerce entity.

<Relationship name="MyTest" type="Relationship" modelName="Product" isMultipleItems="true"/>
  1. Save and close the file.

See Also

Other Resources

Integrating the Cross-Sell/Up-Sell Relationship Manager