Jump to content

Recommended Posts

i have a csv file of 17000 products and i want to upload it
the behavior is strange and not always the same, i get non errors the explorer is freezing and the products are not uploaded.

i upload also categories before that and i see that even in the categories the upload is not succesful neither has the same behavior in multiple loading.

the import seems unstable for me and i want to ask if there is a patch or workaround to manage to load the products and launch the site?

iam using 1.3.7.

thank you for your time

Link to comment
Share on other sites

one hint additional is that i tried to load products & categories in multiple sizes

ex: products 5, 10, 50, 200, 6000
5 products were loaded ok
10, ok,
50 xmmm
from this size and up the browser is freezing and i cannot track what is going on
when lets say at 20 min i return to the catalog screen i search for thr products beneath the categories i get nothing

seems that it is a freeze issue and triggers to stop the loading process; timeout?

Link to comment
Share on other sites

i am trying to understand how the loading works
if i have a csv with categories

lets say A category (name) and parent category i have B (parent category)
i load the categories and from ~11 parent categories will load only 9, 2 were missing

i solve this out by manual updating the categories

in the products csv i have a column categories which i put the A info; is that right?

when i load the products from 200 for example products the systems will load 100 and will create A category to Home along with other B fields but without any product assosiated with them.

so what can i understand from this behavior?
not to load categories?
not to load parent categories?
what?

Link to comment
Share on other sites

You should use the category IDs instead of category names. Also, make sure that your category IDs start with 2, not 1, otherwise you will overwrite the default Home category. It is best to import the categories first, then the products, so that existing categories will be used instead of new ones created.

Link to comment
Share on other sites

Thanks.
I will try it, however the categories is the first import and then the products
The difficult thing is how i can manage to update 17000 products with the right category ID before import; i dont remember however if on the products file there is a category ID? is there ?

Link to comment
Share on other sites

following my tests i will point again that the issue might exist elsewhere maybe on the browser freezing....

50 products are import ok, but 100 products are not; cause the browser is freezing.

is there a back end script that i can manage to load them directly to the DB? can i use direct sql commands for loading or there are links between tables that the interface manages?

Link to comment
Share on other sites

The browser freezing won't cause the import to stop, since the import is happening on the server, not your computer. The import does take a very long time and will time out when the "maximum execution time" is reached or the "memory limit" is exceeded (if you are importing images that are too large). You'll need to increase your maximum execution time and memory limit (using a php.ini file) as high as you can so that the import can go for as long as possible, then check how many products you can import before they aren't importing into the database. Once you've figured out how many products you can import at one time, separate your CSV file into separate files with only that number of products, or if you can't do that, change the "Skips lines" value when importing to skip the products that have already been added. I know this isn't ideal, but it is the best you can do with PrestaShop, since there are links between tables that the interface manages.

Link to comment
Share on other sites

  • 1 month later...

If your website doesn't already have one, you'll need to create one. I think you put it in the root directory for the Front Office and the admin directory for the Back Office. If you do a Google search, you should be able to find an example php.ini file. You need to increase the maximum_execution_time value and memory_limit value.

Link to comment
Share on other sites

Thank you Rocky, you're rock! Lol...
As you said, i made and put both of my php.ini on these 2 directories, and i don't have problem with server error anymore.

For those who have problem, my php.ini is as simple as this:

max_execution_time = 120
memory_limit = 128M

A question, is there any risks if i put '0' as max_execution_time and memory_limit ?

Link to comment
Share on other sites

  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...