Hello,
You can use sample code bellow to create document for each SKU object:
CMS.Ecommerce.SKUInfo sku = CMS.Ecommerce.SKUInfoProvider.GetSKUInfo(skuId);
if (sku != null)
{
// Create product document type and assign SKU to it
CMS.TreeEngine.TreeNode productDoc = new CMS.TreeEngine.TreeNode("custom.defaultproduct", tree);
productDoc.SetValue("ProductName", sku.SKUName);
productDoc.DocumentName = sku.SKUName;
productDoc.NodeSKUID = sku.SKUID;
productDoc.DocumentCulture = CMSContext.CurrentUser.PreferredCultureCode;
}
You can find more details and sample code how to import products from external source in '
Products import from external source' article.
Best Regards,
Martin Dobsicek