Importing products into version 01.02.02

Dec 22, 2009 at 4:14 PM

Hi

I am using version 01.02.02 (Normal edition) and want to import products into the module.

I am not familiar with XML, in order to use CSV i need to know how to format the file (field names and sequence)

Can someone help me?

Coordinator
Dec 23, 2009 at 5:37 AM

Hi,

The import of products into NB_Store using CSV, implements an xml mapping process....you don;t need to understand xml to use it, but it does help.

Have a read on the documentation.html that comes included in the install package, this explains the basics.

What you basically need to do is setup a mapping between your csv file and the xml import structure...below I've listed an example of what one of my client uses.

Also in the documentation is says the defult field delimeter is ";" this is out of date the actual defaults for delimeters are :-

A default Field delimeter of semi-colon is used ","
A default Row delimeter of carrage return, line feed is used "vbCrLf"

To change these delimeters you can use the "RowDelimeter.ImportMapping" and "FieldDelimeter.ImportMapping" settings.

The import of CSV can be a bit tricky to get right so I suggest keep it very simple to start with and then build up your data.

Regards,

Dave.

--------------------------------------------------------------------------------
CSV file:
--------------------------------------------------------------------------------

VMC;Kit double flux;U600008;UNELVENT;KIT DBLE FLUX HR X2REPART SOUF 4PIQ;KIT VMC DOUBLE FLUX AKOR HAUT RENDEMENT AVEC 2 REPARTITEURS SOUFFLAGE 4 PIQUAGES;1;12;1 917,13;U600008.JPG
VMC;Kit double flux;U600007;UNELVENT;KIT DBLE FLUX HR REPART SOUF 10 PIQ;KIT VMC DOUBLE FLUX AKOR HAUT RENDEMENT AVEC REPARTITEUR SOUFFLAGE 10 PIQUAGES;1;12;1 844,99;U600007.JPG
VMC;Kit double flux;U813881;UNELVENT;GAINE SOUPLE PVC ISOLEE D80MM L6M;GAINE SOUPLE PVC ISOLEE D80MM LONGUEUR 6 M;1;2;18,42;U813881.JPG
VMC;Kit double flux;U813883;UNELVENT;GAINE SOUPLE PVC ISOLEE D125MM L6M;GAINE SOUPLE PVC ISOLEE D125MM LONGUEUR 6 M;1;2;25,03;U813883.JPG
VMC;Kit double flux;U813884;UNELVENT;GAINE SOUPLE PVC ISOLEE D150MM L6M;GAINE SOUPLE PVC ISOLEE D150MM LONGUEUR 6 M;1;2;31,83;U813884.JPG
VMC;Kit double flux;U607044;UNELVENT;KIT AKOR VMC DOUBLE FLUX T3 A T7;KIT AKOR VMC DOUBLE FLUX MAISON T3 A T7;1;12;703,47;U607044.JPG
VMC;Kit hydro/auto;U600610;UNELVENT;KIT VMC HYG B T3/4 ELEC+DP TB CONSO;KIT OZEO VMC HYGRO TYPE B T3/4 BOUCHE CUISINE ELEC BOUCHE WC DETEC PRESENCE TRES BASSE CONSOMMATION;1;8;346,88;U600610.JPG
VMC;Kit hydro/auto;U600611;UNELVENT;KIT VMC HYG B T5/7 ELEC+DP TB CONSO;KIT OZEO VMC HYGRO TYPE B T5/7 BOUCHE CUISINE ELEC BOUCHE WC DETEC PRESENCE TRES BASSE CONSOMMATION;1;8;346,88;U600611.JPG
VMC;Kit hydro/auto;U600710;UNELVENT;KIT VMC HYGRO TYPE B T3/4 ELEC+DP;KIT OZEO VMC HYGRO TYPE B T3/4 BOUCHE CUISINE ELEC BOUCHE WC DETEC PRESENCE;1;8;278,74;U600710.JPG
VMC;Kit hydro/auto;U600711;UNELVENT;KIT VMC HYGRO TYPE B T5/7 ELEC+DP;KIT OZEO VMC HYGRO TYPE B T5/7 BOUCHE CUISINE ELEC BOUCHE WC DETEC PRESENCE;1;8;278,74;U600711.JPG
VMC;Kit hydro/auto;U813881;UNELVENT;GAINE SOUPLE PVC ISOLEE D80MM L6M;GAINE SOUPLE PVC ISOLEE D80MM LONGUEUR 6 M;1;2;18,42;U813881.JPG
VMC;Kit hydro/auto;U813883;UNELVENT;GAINE SOUPLE PVC ISOLEE D125MM L6M;GAINE SOUPLE PVC ISOLEE D125MM LONGUEUR 6 M;1;2;25,02;U813883.JPG
VMC;Kit hydro/auto;U813884;UNELVENT;GAINE SOUPLE PVC ISOLEE D150MM L6M;GAINE SOUPLE PVC ISOLEE D150MM LONGUEUR 6 M;1;2;31,83;U813884.JPG

--------------------------------------------------------------------------------
categoryCSV.ImportMapping
--------------------------------------------------------------------------------

 

<NB_Store_CategoriesInfo>
  <CategoryID></CategoryID>
  <PortalID></PortalID>
  <Archived>false</Archived>
  <CreatedByUser>-1</CreatedByUser>
  <CreatedDate>2009-09-10T17:03:51.47</CreatedDate>
  <ParentCategoryID></ParentCategoryID>
  <ListOrder>1</ListOrder>
  <Lang>[LANG]</Lang>
  <CategoryName>[COL:2]</CategoryName>
  <ParentName>[COL:1]</ParentName>
  <CategoryDesc></CategoryDesc>
  <Message></Message>
  <ProductCount>0</ProductCount>
  <ProductTemplate />
  <ListItemTemplate />
  <ListAltItemTemplate />
</NB_Store_CategoriesInfo>

--------------------------------------------------------------------------------
productCSV.ImportMapping
--------------------------------------------------------------------------------

<P>
  <NB_Store_ProductsInfo>
    <ProductID></ProductID>
    <PortalID>[PORTALID]</PortalID>
    <TaxCategoryID>-1</TaxCategoryID>
    <Featured>false</Featured>
    <Archived>false</Archived>
    <CreatedByUser>-1</CreatedByUser>
    <CreatedDate>2009-09-10T17:03:51.47</CreatedDate>
    <IsDeleted>false</IsDeleted>
    <ProductRef>[COL:3]</ProductRef>
    <Lang>[LANG]</Lang>
    <Summary>[COL:6]</Summary>
    <Description></Description>
    <Manufacturer>[COL:4]</Manufacturer>
    <ProductName>[COL:5]</ProductName>
    <XMLData>&lt;genxml&gt;&lt;textbox&gt;&lt;txtcolissage&gt;[COL:7]&lt;/txtcolissage&gt;&lt;/textbox&gt;&lt;checkbox /&gt;&lt;dropdownlist /&gt;&lt;checkboxlist /&gt;&lt;radiobuttonlist /&gt;&lt;/genxml&gt;</XMLData></NB_Store_ProductsInfo>
  <M>
    <NB_Store_ModelInfo>
      <ModelID></ModelID>
      <ProductID></ProductID>
      <ListOrder>1</ListOrder>
      <UnitCost>[COL:9]</UnitCost>
      <Barcode />
      <ModelRef>[COL:3]</ModelRef>
      <Lang>[LANG]</Lang>
      <ModelName>[COL:5]</ModelName>
      <QtyRemaining>-1</QtyRemaining>
      <QtyTrans>0</QtyTrans>
      <QtyTransDate></QtyTransDate>
      <ProductName>[COL:5]</ProductName>
      <PortalID>[PORTALID]</PortalID>
      <Weight>[COL:8]</Weight>
      <Height>0.00</Height>
      <Length>0.00</Length>
      <Width>0.00</Width>
      <Deleted>false</Deleted>
      <QtyStockSet>0</QtyStockSet>
      <DealerCost>0.0000</DealerCost>
      <PurchaseCost>0.0000</PurchaseCost>
      <XMLData /></NB_Store_ModelInfo></M>
  <I>
    <NB_Store_ProductImageInfo>
      <ImageID></ImageID>
      <ProductID></ProductID>
      <ImagePath>E:\Websites\NB_Store\v1.2.0\Website\Portals\0\productimages\[COL:10]</ImagePath>
      <ListOrder>1</ListOrder>
      <Hidden>false</Hidden>
      <Lang>[LANG]</Lang>
      <ImageDesc />
      <ImageURL>/Portals/0/productimages/[COL:10]</ImageURL></NB_Store_ProductImageInfo></I>
  <D></D>
  <C>
    <NB_Store_ProductCategoryInfo>
      <ProductID></ProductID>
      <CategoryID>[COL:2]</CategoryID></NB_Store_ProductCategoryInfo></C>
  <options></options></P>

--------------------------------------------------------------------------------
replaceCSV.ImportMapping
--------------------------------------------------------------------------------

<root>
<item col="8" str="," rpl="." substr="true"/>
<item col="9" str="," rpl="." substr="true"/>
<item col="8" str=" " rpl="" substr="true"/>
<item col="9" str=" " rpl="" substr="true"/>
</root>