Type: IProductManager

Summary:

Product manager

Remarks:

Methods:

DeleteAllProduct

Summary:

Delete all products

GetById(System.Int64)

Summary:

Gets a product object by its id

Parameters:

  1. id: product id

Returns:

The product id if found, null otherwise

Example:

This example shows you how to change product color

            var product = Project.Products.GetById(productId);
            product.Color = Project.Colors.Get("Sym3 Red")
            

Events

ProductCreated

Summary:

This event is fired when a product is added

Example:

This example shows you how to subscribe to this event

            //---- JAVASCRIPT:
            Project.Products.add_ProductCreated(OnProductCreated);
            
            function OnProductCreated(productId) {
                print(productId);
            }
            
            //---- C#
            Project.Products.ProductCreated += new ProductAddedDelegate(Products_OnProductCreated);
            ...
            
            private void Products_OnProductCreated(long productId)
            {
                Console.Writeline(productId);
            }
            
            

ProductDeleted

Summary:

This event is fired when a product is removed

Example:

This example shows you how to subscribe to this event

            //---- JAVASCRIPT:
            Client.Products.add_ProductDeleted(OnProductDeleted);
            
            function OnProductDeleted(productId) {
                print(productId);
            }
            
            //---- C#
            Client.Products.ProductDeleted += new ProductDeletedDelegate(Products_OnProductDeleted);
            ...
            
            private void Products_OnProductDeleted(long productId)
            {
                Console.Writeline(productId);
            }