Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Ecommerce product import View modes: 
User avatar
Member
Member
jamiemoran-me - 10/26/2009 6:30:38 AM
   
Ecommerce product import
I'm building a site with Kentico 4.1 using the ecommerce starter kit as a base.

I have imported 250 products to [dbo].[COM_SKU] with a SQL script but I cant make the products appear on the site.

I suspect they are are not properly associated with the correct document type but I cant see where to update it.

Any ideas?

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 10/30/2009 5:01:53 AM
   
RE:Ecommerce product import
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