Products import from external source

   —   
This article briefly describes how to import products from external source - in this example from .csv file

Here you can find a package with sample commented code and .csv file with few products - sample package for v3.1. Here you can download the package for 3.1a versionpackage for 4.0 version,here is the package for version 6 and here is the package for v7.

1) Backup your database at first.
2) Copy the following files to the root of your web project folder:

a. ImportProducts.aspx
b. ImportProducts.aspx.cs
c. Products.csv

3) Open ‘ImportProducts.aspx’ in your internet browser.
4) Script will run and the following objects will be created:

a. CMSDesk/Tools/Ecommerce/Products – “Product 1”, “Product 2”, “Product 3”
b. CMSDesk/Tools/Ecommerce/Configuration/Department – “Default department”
c. CMSSiteManager/Development/Document types – “Default product”
d. CMSDesk/Content/<site root>/Custom products – documents “Product 1”, “Product 2”, “Product 3”

Please note: You may need to go to Properties of appropriate page, into Template tab and set Inherit content to Do not inherit any content. This is called visual inheritance - www.kentico.com/docs/devguide/visual_inheritance.htm. Or, you may need to explicitly set the page tempalte for the parent and product documents (e.g. productDoc.DocumentPageTemplateID = <template_ID>;)
Share this article on   LinkedIn

Juraj Ondrus

Hi, I am the Technical support leader at Kentico. I'm here to help you use Kentico and get as much as possible out of it.