Jump to content

Import 330.000+ pictures as products from folder structure (15.500+ folders)


fiedelio
 Share

Recommended Posts

Hello, 

 

I am currently trying to import a large number of pictures into prestashop.

(One picture per product)

 

As the CSV import does not run trough while importing this large CSV (even if the PHP.INI is set to irrational high limits), I've tried to import the pictures by PHP code directly into the DB.

-> Read filesystem stepwise and add categories and products in blocks of 100.

 

The products & categories are imported perfectly.

 

But how can I add the correct picture to each product via a script?

Which tables must be affected?

Is there any already existing script I can use?

 

I would highly appreciate if anybody could give me a hint or structure which may help.

Edited by fiedelio (see edit history)

Share this post


Link to post
Share on other sites

Hey Sandip,

 

thank you, that helped a lot.

Do you, by chance, have the filename / location of the standard file upload class/handler?

So I do not need to do all that DB stuff by myself and maybe can use parts of the existing structure.

 

br

Share this post


Link to post
Share on other sites

It might be not easy to track all the options to handle controller.

Although, i should mentioned the controller file name : 

               AdminImportController will find in controllers/admin directory.

Also see AdminProductsController will find in same directory for public function processImage() method to image handling.

Share this post


Link to post
Share on other sites

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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More