iulu2v Posted October 15, 2013 Share Posted October 15, 2013 Hello. I have a question if someone can answer this for me. regarding the image system on my ftp /img folder. i always assumed that the /p/1/2/3 is the folder for product with the id 123. i guess is not like that. cause i have images scrambled in all folders that have nothing to do with the id of the product. in fact if i upload a new image on a product. that image is given an id like 789.jpg that is found on the folder p/7/8/9/789.jpg. even if the product id is 123. and the next image is given 790.jpg. and 791,792 and so one my question now is. how do i relate an product with a folder on the ftp. i say this cause i tried regenerating some images and it gives me some: Original image is missing or empty (/home/public_html/site/img/p/6/5/2/652.jpg) now i know that in the folder /6/5/2 there is no image (it tells me that), but i don't know what product is referring to. if a have like 1000+ products is kinda hard to find the ones 40 errors where the image didn't get imported from my csv. so anyone?! Thank you. Link to comment Share on other sites More sharing options...
bellini13 Posted October 16, 2013 Share Posted October 16, 2013 it is not the ID of the Product, it is the ID of the image. Since a product can have multiple images, the Product ID cannot be used, since it is not unique. So if you have an image, then the image will be assigned an ID, let us say 123. The image would be store as /img/p/1/2/3/123.jpg Link to comment Share on other sites More sharing options...
iulu2v Posted October 16, 2013 Author Share Posted October 16, 2013 thanks for your reply. yes i know that (figured it out as stated) my question: how can i know what folder is for what product?! thanks Link to comment Share on other sites More sharing options...
parsifal Posted October 17, 2013 Share Posted October 17, 2013 Hello. The association you 're looking for seems to be stored in the shop's database. Specifically, the "ps_image" table... Link to comment Share on other sites More sharing options...
bellini13 Posted October 17, 2013 Share Posted October 17, 2013 simply looking at the folder or file name you cannot. you have to take the image id from the filename, and then back trace to find the product id as parsifal states above. Link to comment Share on other sites More sharing options...
Grinderman Posted August 29, 2018 Share Posted August 29, 2018 Another solution I noticed is to view the products on the Prestashop back office and check which have missing images, click on one of the products with missing images, go to the images tab and "Right click + Copy Link Location" this will give you the directory path you are looking for and not the friendly URL. 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