[email protected] wrote:I've imported the product in the back office manually, exported it and it re-imports fine as a stand alone product once I've changed the image path back to the file location. The problem is when I copy and paste it exactly as it is, i get the following error with nothing in the log:
This www.cbauto-solutions.com page can’t be found
No web page was found for the web address: http://www.cbauto-solutions.com/Admin/Product/ImportExcel
Search Google for cb auto solutions Admin Product Import Excel
HTTP ERROR 404
The products then actually appear, but none of the images are generated with them. The only difference to this product compared to the others is that this one doesn't have any 'product attributes' with it where products with both 'product attributes' & 'Specification attributes' import just fine. There is also no system log error generated with this.
Tried clearing the pictures database, reseeding to 0, cleared all the images off the server and googling the issue all to no avail.
Thanks, Paul
Hi Paul/all,
Just an update on this error. This fix is for V4 of NOP, I have not tested it in earlier versions.
I found the problem occurs when you are importing multiple items using an excel spreadsheet where some or all the Products have Product Attributes or Specification Attributes.
It actually fails at the point it tries to write the Product Attribute Mapping record.
If you are running the import, Products with no Attributes or specification attributes import with no error, the first product found with Attributes or specification attributes also imports with no errors.
It is any subsequent products that have Attributes or specification attributes that causes the error.
For anyone needing a fix for this go to NOP.Services/ExportImport/ImportManager.cs
Find the ImportProductsFromXlsx method at line 718 then go down to line 950.
At line 950 the loop that writes the import starts with line 952 the beginning of the code that manages the attribute & specification attribute import, at the end of the 'if' statement line 984 is the line that reads the spreadsheet row for a product.
manager.ReadFromXlsx(worksheet, iRow);
I found that by adding code that reinitialized the "typeOfExportedAttribute" variable either before or after the product read fixes it error and results in the excel import with product attributes & specification attributes working as it should.
typeOfExportedAttribute = ExportedAttributeType.NotSpecified;
manager.ReadFromXlsx(worksheet, iRow);
Hope this helps
Garry