Import Not processing Categories Correctly

Feb 19, 2010 at 12:25 PM


Trying to get the import to work with no luck.

I can import the products, but if I don't select Create Categories then the products end up with no categories.

If I select Create Categories, it doesn't match the products to the categories but creates new top level categories.

It's really pretty unusable as it is.

I downloaded the source, got it to build and had a look at it.

From what I can see, if you don't select Create categories, there's no code at all to link the categories in the import file to the existing categories.

Are you able to fix this in the very near future, or should I have a crack at it myself. I haven't done any development in VS2008 before, let alone DNN, but probably can work it out with some help. Main thing I can't see is how to run it in debug mode. Probably haven't set it up correctly. If I just run of my localhost, it runs fine. However if I run execute from VS2008 I get a directory listing of the NBStore folder.


Feb 20, 2010 at 1:13 AM

hi JJ,

The categories should be working, I've used them on on a couple of our clients websites.  If you don;t check create categories then just categories won't be created, but if the category already exists then the products should be placed into it.  You should be aware that the categories are allocated via the category name, so you need to make the import file category name match exactly what the existing category name is.

What input file are you using a CSV or the XML import?

The xml should be just a direct import and is more reliable, but needs the correct format.  The CSV can be in any format, but you need to make sure all the settings for the CSV import file is setup, this can be very tricky to get right, and the documention is a bit poor (as always!!).  Have a look at these threads

If you still can;t get it to work, let me know in a bit more detail what your doing?

On the Visual Studio compile I've created this

This is for the next release of NB_Store and is not in codeplex yet, in which I've change the project sln file about a bit to make it easier...but basically the difference is I've removed the "localhost" project, because you don't need this.  I just had it there to move the dll's into the correct DNN/bin folder.  On the debug side, simple set the website running on localhost and then use the "Attach to Process" to link the code to Visual Studio.  Of course you need to compile NB_Store in debug mode in order to get your symbol table file.



Feb 20, 2010 at 7:07 AM


This is my mapping:

      <Barcode />
      <XMLData />


This is a sample of my file:

Sunbelt Software,P411IEX1S00,Vipre Consumer Full Version Single User 1 Year,32.99,1 User,Vipre Consumer,Vipre Con 001U 1yr
Sunbelt Software,P411IEX1S02,Vipre Consumer Full Version Single User 2 Year,59.95,1 User,Vipre Consumer,Vipre Con 001U 2yr
Sunbelt Software,P411IEX1S03,Vipre Consumer Full Version Single User 3 Year,79.95,1 User,Vipre Consumer,Vipre Con 001U 3yr

If I import without creating categories, all the products import, but are linked to no categories.

If I import and create the categories, all the categories are created as top level categories. I then manually go through each one and link it to it's parent as a work around. So the category names definitely match.

It's somehow related to the parent categories.

This is my category mapping:

  <ProductTemplate />
  <ListItemTemplate />
  <ListAltItemTemplate />


Can't see what I'm missing. Probably something simple.


Feb 20, 2010 at 4:52 PM

Hi JJ,

I think your talking about the problem of categories not being created under parent categories,  this is because the parent categories don;t exist when the sub categories are imported.  The workaround is to place the parent categories in the import file before the import records in the category column...??? If that make sense?

There is also and issue with the invlaid product ref making the category fail to import...have a look at this issue and it shows you a workaround.



Feb 20, 2010 at 11:03 PM


I understand what you are saying but that's not what's happening here.

If I import and don't have the create categories ticked, so I'm not trying to import categories, none of the items get associated with the categories.

The categories have the correct name, because they were created via the import (and then moved under the correct parents).

If I do the import and say create categories, Items that are to be placed under a top level category work. However items that are under a child category end up with a new parent category of the same name. Somehow the process of identifying the category by name when it's a child doesn't return a category id, so a new one gets created.



Feb 20, 2010 at 11:35 PM


Got it to work,

1. Import as new products (I'd deleted them all first)

2. Enable Create Categories (even though all the categories exist)!!!!

4. Create dummy products at the start of the file for each of the parent categories.



Feb 21, 2010 at 12:32 PM

Hi JJ,

Great that you've got it working, I think the problem is the same issue.  The work around is to create the parent categories before.....I think it's to do with the import file building up the full path of the category (i.e. "parent>sub category"), but if the parent isn;t in the import file it can't assume that the category is the right one, even if the name is the same.

Hopefully we'll get a better fix in the future.



Feb 21, 2010 at 9:18 PM


No worries.

I wouldn't mind getting involved in the project. What would I need to do? ie Which source control are you using?

There are a couple of things I would like to see in the product, and it's better to do it as part of the project rather than make my own mods and then have to keep updating them.

Getting the import module to work better would be one of them.


Feb 21, 2010 at 10:18 PM

Hi JJ,

Great, I'm always more than happy to include other devlopers work into NB_Store.  If you contact me through codeplex and I'll be able to get in contact and organise any efforts you want to make, so we don;t get overlap and to ensure any changes can be fitted into NB_Store without issues.



(P.S. I'm in th UK at the moment, I'll be back in the office tomorrow, but it'll probably be wednesday before I've caught up with work and be able to reply)