Partager via


Implementing the "Customers who bought this item also bought :" feature on your Commerce Server site

Most of the e-commerce sites display a list of products related to the current product using a variation of the  “Customers who bought this item also bought : “ link. Clicking on any of these links will take you to that product's page.You can easily implement this feature in your Commerce Server site by using the relationships feature in the product catalog system. The product catalog system allows you to create relationships between products and categories in one or more catalogs. This can be done by using the Catalog Manager UI in the feature pack or programatically using the Catalog web service or the Catalog com objects. More importantly a product or a category in one catalog can be related to a product or category in the same catalog or in a different catalog. When you create a relationship you can specify a name and description. The description field is multilingual thereby allowing you to specify a description for each relationship in each language contained in the catalog. This ably suits multilingual sites where the description of the relationship can be displayed in the language of the browser. You can create more than one relationship between the same related items provided that the relationship names are different.
          When displaying the related items for a product or a category on your runtime site you can call the GetRelatedCategories and/or GetRelatedProducts method on the Product and Category classes to get a dataset containing the related items. The RelationshipDescription column in the Dataset will contain the description in the current ActiveLanguage set on the ProductCatalog object. The CategoryName or ProductId columns from the appropriate datasets can then be bound to a control displaying the related products or categories for the current item. The dataset also contains the TargetCatalog and RelationshipName columns. You can use the values in the TargetCatalog and ProductId or CategoryName columns to display the product or category page when a user clicks on one of the links pertaining to the related items.
            For eg you can relate a  book in the books catalog to a list of related CDs in the CD's catalog. When the user clicks on the book page you can get the CDs related to this book and display them on the same page. If a user clicks on a CD the link can then take him to the CD's page.

Comments

  • Anonymous
    May 29, 2006
    A while back I had written about sequencing products and categories in the feature pack and mentioned...
  • Anonymous
    May 29, 2006
    A while back I had written about sequencing products and categories in the feature pack and mentioned...
  • Anonymous
    June 09, 2009
    PingBack from http://besteyecreamsite.info/story.php?id=2418