X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Adding a graphic (https://forum.x-cart.com/showthread.php?t=72168)

pauldodman 11-28-2017 01:56 AM

Re: Adding a graphic
 
Indeed, the import function can be very frustrating, especially if you have to keep fixing images, 1 or 2 at a time and then re-run the import, fix the next 2 images, and so on.
What I would suggest is fixing it so that it shows lots or all the errors at once, so you can fix them all in one go.

To do that, edit the file:
include/import.php

and find
$max_errors = 2; // Max number of errors before break importing

and change the 2 to something larger.

richardjknox 11-28-2017 02:15 AM

Re: Adding a graphic
 
Hi Paul

Yes I've done that, and that is fine with all the other fields categories etc, but if any image is wrong, then the import stops at that point, irrespective of the max error no.

I've had it where I've imported 1000 records which takes ~ 3 hours and has stopped at record 999 !

I believe it's not the image at fault it seems to be a timeout over the internet

Xcart have quoted me $200 to fix it... so I might have to do that, as I'm not bothered about the time it takes, I just can't be done with it stopping after 2 or 3 hours of importing.

Cheers
RJK

pauldodman 11-28-2017 02:32 AM

Re: Adding a graphic
 
Yes, it's probably a timeout - but it shouldn't take 3 hours to import 1000 records!!
Something is wrong - other than the timeout.

Have you tried importing a smaller file to see - say just a couple, or 10 records?

richardjknox 11-28-2017 02:47 AM

Re: Adding a graphic
 
hi Paul

Yes that's the only way to do it ... cut it down in to batches of 100.

But it takes for ever.... it seems such a simple request .... modify the code so it ignores any errors ... but even Xcart are not sure if they can do it!

Cheers
rjk

pauldodman 11-28-2017 03:13 AM

Re: Adding a graphic
 
So it takes forever, even with 10 rows?

cflsystems 11-28-2017 06:04 AM

Re: Adding a graphic
 
Remove images from the import file. Import it. Then do another import with images only. At least you will have all the other fields already in. Images may take longer if the import has to copy them from remote location or url. Your disk speed, space, OS and overall server resources also play role.

richardjknox 11-28-2017 06:10 AM

Re: Adding a graphic
 
Hi Steve

That's exactly what I do ... Xcart have come back to me with a cost to modify the import.php @ $200 ... but it will be well worth it for me ... as I could set the import going overnight and not come down to it having failed in the morning meaning I've got to do it all over again !

It takes 8 hours to do 30k records !

I'll let you know how I get on

cheers
rjk

richardjknox 12-03-2017 10:49 AM

Re: Adding a graphic
 
Hi Paul

it pro rata ~ 3 secs / records so 10 rows no time at all ... it's just I've 30,000 !

pauldodman 12-04-2017 03:53 AM

Re: Adding a graphic
 
OK, that proves that the process itself is working at least, and also that your import file is correct, etc.

It's just a case of deciding if you are going to split it up into several files so it comes in under the timeout limit, or you split it into less data with no images for e.g. - or you get it fixed so it runs as is.


All times are GMT -8. The time now is 03:18 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.