kentico_martind
-
10/16/2009 4:24:04 AM
RE:Programmatically determine existance of product and update.
Hello,
You can use following method:
CMS.Ecommerce.SKUInfoProvider.GetSKUs("whereCondition", "orderByExpression");
to get DataSet with product records that fulfill given where condition. Then you can use SkuID from particular record from DataSet to create SKUInfo object, change its properties and save these changes. Please see sample code bellow:
CMS.Ecommerce.SKUInfo sku = CMS.Ecommerce.SKUInfoProvider.GetSKUInfo(skuId); sku.SKUAvailableItems += 1; CMS.Ecommerce.SKUInfoProvider.SetSKUInfo(sku);
Best Regards,
Martin Dobsicek
|