Excel import generating ERROR - New Install of 1.8

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
1.  installed new database with sample data
2.  exported data to new xcel sheet
3.  deleted database and started over with no sample data.
4.  entered 17,000 items into the xcel sheet.
5.  tried importing the sheet and get following error...

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Nop_Product_Nop_ProductTemplate". The conflict occurred in database "AToyStore", table "dbo.Nop_ProductTemplate", column 'ProductTemplateId'.
The statement has been terminated.

Only 164 records are added.

If I add only 300 records... I don't get this error.

Anyone know what's up with this?
13 years ago
yes it happens sometimes...you have to make sure that format of any cell doesn't change...
when you paste your products information in the excel sheet, do not paste it normally

Try to paste like this:

Right click on destination column > Paste Special > Values
13 years ago
With that many records its hard to find errors in the data.  There was indeed an error and that is why it stopped.  When copying redundant entries (like "Show on Home Page") the numbers had increased sequentially as Excel does so eloquently.  But  I have had so many more issues since then...

1.  I can not import more than 3000 records at a time.  There seems to be an issue with the amount of time required to parse through all of the records and I keep getting an error.  After 3 hours of inserting 3000 records at a time it seemed like it took it all.  The nop.product table is correct, however...

2.  the Nop.ProductVariant duplicated a record at # 4568 and ceased to enter records from that point on.  So, the Product and ProductVariant tables do not coincide.  I double checked the xcel sheet and it is correct, along with the Nop.Product table.

This definititely seem to be a bug.

Wow, this is frustrating as I have been working on an easy way to get items and pictures loaded in an efficient manner for 3 months now.
13 years ago
Product and ProductVariant tables do not coincide

Hi, did you check the records in the storefront ? they might well be fine - the two tables don't actually have to have the same sequential numbers, just so long as the variant is associated with the correct product

- hayden
13 years ago
I understand your point.  In this case there are 17,000 individual items and the table holds each product's SKU, which is listed in the Excel sheet.  But the table is not complete and is missing the SKU (and other information for each record) for 13,000 items.
13 years ago
Hello Hrdfsique

Can you shed some light on how the excel sheet is formatted i.e. column names, default values etc.

I am trying to import only about 200 products and get an error.

Any help would be appreciated.

By the way, did you resolve your issue ?

Moe Lakhany
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.