The 5th annual nopCommerce conference will take place in India on the 10th-11th of October. Please find more about this event here

Product Import Error/issue

Posted: February 22, 2018 at 4:36 AM Quote #201032
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
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: February 26, 2018 at 10:33 PM Quote #201187
see this settings https://ibb.co/kE0DoH


Please check your settings for saving pictures whether to DB or File System.That might be the reason that affecting your import.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Investing the time to learn.
Posted: July 04, 2018 at 10:17 PM Quote #208067
[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
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: October 06, 2018 at 6:36 AM Quote #212862
Thanks Garry,

Only just seen your reply.  I did actually get the import feature from an excel file to work so didn't have to implement the code, however, I've since started another site which exhibits exactly the same as your'e describing - I just can't find the NOP.Services/ExportImport/ImportManager.cs file.  Was this for nop 4.2?

I'm not a webdev in any sense, just someone that's self taught from trial and error, but somethings elude me!  It's kind of a miracle my first site:   https://www.cbauto-solutions.com/ works at all!

Thanks, Paul
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: October 06, 2018 at 2:35 PM Quote #212871
[email protected] wrote:
...can't find the NOP.Services/ExportImport/ImportManager.cs file...


You need the Source Code.  Look in folder \Libraries\Nop.Services
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
www.noptools.com
Posted: October 06, 2018 at 8:35 PM Quote #212877
[email protected] wrote:
Thanks Garry,

Only just seen your reply.  I did actually get the import feature from an excel file to work so didn't have to implement the code, however, I've since started another site which exhibits exactly the same as your'e describing - I just can't find the NOP.Services/ExportImport/ImportManager.cs file.  Was this for nop 4.2?

I'm not a webdev in any sense, just someone that's self taught from trial and error, but somethings elude me!  It's kind of a miracle my first site:   https://www.cbauto-solutions.com/ works at all!

Thanks, Paul


Hi Paul/New York,

When I did it I was working with NOP V4, I haven't downloaded V4.2 so will go with New York's location for the source file for it (TA for future reference).

FYI I also needed to use Attribute Combinations which you can not do with the Excel import ATM so have done my own import/write stuff that does all that.

Its only a proto type atm for a client here in Aust but the next revision will be an application that in effect integrates and Australian Point Of Sale app called Retail Manager (from MYOB) with NOP.

Soz I can't help with V4.2 atm.

Cheers
Garry
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: November 09, 2018 at 11:27 AM Quote #214115
Is there a way to fix this without the source code?
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.
eCommerce CONFERENCE 2019
Learn more