fiedelio Posted January 8, 2015 Share Posted January 8, 2015 (edited) 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 January 8, 2015 by fiedelio (see edit history) Link to comment Share on other sites More sharing options...
sandipchandela Posted January 9, 2015 Share Posted January 9, 2015 Hey, PS will store images in p directory under img directory. Tables will affect are as follows: 1) ps_image 2) ps_image_lang 3) ps_image_shop Directory structure will created based on ps_image table primary key id_image from 1 to 10 numbers. 1 Link to comment Share on other sites More sharing options...
fiedelio Posted January 11, 2015 Author Share Posted January 11, 2015 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 Link to comment Share on other sites More sharing options...
sandipchandela Posted January 12, 2015 Share Posted January 12, 2015 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now