Dynamicweb 8 Documentation
RelatedProducts Method
Example 

Gets the related products. Related products are used to suggest a customer to buy complementary products to the products they want to buy, e.g. a shirt and a tie. Administrator can create relations in Management Center -> eCommerce settings -> Product catalog -> Related products.
Syntax
'Declaration
 
Public Function RelatedProducts() As ProductRelatedCollection
public ProductRelatedCollection RelatedProducts()
Example
class MyPage : System.Web.UI.Page
{
    private Product product;
    private Product productNew;
    private void SavePrices()
    {
         foreach (Dynamicweb.eCommerce.Products.ProductRelated pr in product.RelatedProducts)
         {
             pr.Save(productNew.ID, pr.ProdRelID);
         }
    }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Product Class
Product Members

Send Feedback