ctech Posted December 16, 2010 Share Posted December 16, 2010 i been looking around for a hour now and just can't find the file file reference for an image. i am setting up a direct connecting with filemaker and the prestashop DB, no more annoying imports or manual editing Link to comment Share on other sites More sharing options...
Joanorsky Posted December 16, 2010 Share Posted December 16, 2010 It seems to me that there is none. Go to IMG folder... on "p" subfolder.. you'll see the images with productID references.. Link to comment Share on other sites More sharing options...
ctech Posted December 16, 2010 Author Share Posted December 16, 2010 ah i see, so the reference is product_id+some_index+size.jpg. so theres some php code that makes all these imgs and dumps in that folder...thanks i go play now Link to comment Share on other sites More sharing options...
superprg Posted December 16, 2010 Share Posted December 16, 2010 What exactly are you looking for?Prestashop only stores the ids, coming from the table ps_imageecho 'id.'-large_scene.jpg" /> ';So, the images are like 1-large.jpgThe image folder is inside shop/img 1 Link to comment Share on other sites More sharing options...
Joe Germann Posted March 21, 2011 Share Posted March 21, 2011 There is no direct image name used in PrestaShop. We developed the code under FileMaker 11, and other software pieces, to create the proper PS images, the image names, and FTP them to the right location.It is a bit tricky to do it right, especially all of the image processing thta is needed to resize/reshape images into the varios image types that PS uses.Unfortunately, my code is not ready for release at this time.Joe Link to comment Share on other sites More sharing options...
eec Posted April 14, 2016 Share Posted April 14, 2016 What exactly are you looking for? Prestashop only stores the ids, coming from the table ps_image echo 'id.'-large_scene.jpg" /> '; So, the images are like 1-large.jpg The image folder is inside shop/img Using your comment I was able to extract the image URL's from Database which I guess was needed by some other people as well, here I will share the simplified SQL code that can do the job; select pp.reference as partNumber, concat('http://YOURSHOPNAME.com/', im.id_image, '-home_default/', pp.reference,'.jpg') as img_link from ps_product pp join ps_image im on (im.id_product = pp.id_product) where pp.active = 1 This will generate a table with product reference as one column and URL to image of the product as the other column. YOURSHOPNAME.COM: should be replaced with your shop's domain. -home_default: can be replaced with any other image format you might need, i.e. 'large' ... Hope it helps, 2 2 Link to comment Share on other sites More sharing options...
JoaquimMarques Posted December 15, 2016 Share Posted December 15, 2016 Thank you very much It was still very useful. Joaquim Link to comment Share on other sites More sharing options...
HackID1 Posted March 1, 2021 Share Posted March 1, 2021 On 4/14/2016 at 7:11 PM, eec said: Using your comment I was able to extract the image URL's from Database which I guess was needed by some other people as well, here I will share the simplified SQL code that can do the job; select pp.reference as partNumber, concat('http://YOURSHOPNAME.com/', im.id_image, '-home_default/', pp.reference,'.jpg') as img_link from ps_product pp join ps_image im on (im.id_product = pp.id_product) where pp.active = 1 This will generate a table with product reference as one column and URL to image of the product as the other column. YOURSHOPNAME.COM: should be replaced with your shop's domain. -home_default: can be replaced with any other image format you might need, i.e. 'large' ... Hope it helps, Thanks just what I was looking for, I already have the product images. Now I have a question how can I make them have the real order that is on the web, since the csv extracts the images of products out of order (in order of upload) but not in order within the article. And another question, how to extract the images from the Categories and Subcategories? The post is years old but that exact sql data is of great value to achieve this. Thank you! SPANISH / ESPAÑOL Gracias justo lo que buscaba, ya tengo las imagenes de productos. Ahora tengo una pregunta como puedo hacer que tengan el orden real que esta en la web, dado que el csv extrae las imágenes de productos desordenado (por orden de subida) pero no por orden dentro del artículo. Y otra duda como extraer las imágenes de las Categorías y Subcategorías? El post tiene años pero es de gran valor ese dato de la sql exacta para lograr esto. Mil gracias! Link to comment Share on other sites More sharing options...
seron Posted November 4, 2022 Share Posted November 4, 2022 (edited) Hello, does anyone know how to get the main image, because by im.id_image the one with the lowest id appears, but not the main one :S Spanish: Hola, alguien sabe como coger la imagen principal, por que por im.id_image aparece la que tiene menor id, pero no la principal :S Edited November 4, 2022 by seron (see edit history) Link to comment Share on other sites More sharing options...
ps8modules Posted November 6, 2022 Share Posted November 6, 2022 Change where pp.active = 1 to where pp.active = 1 AND im.cover = 1 1 1 Link to comment Share on other sites More sharing options...
seron Posted November 6, 2022 Share Posted November 6, 2022 @4you.software Thanks you very much! 1 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