Jump to content

how to associate an image with a product


TomaszMyszak

Recommended Posts

Good morning,
I wanted to update the PrestaShop database with about 1500 products, I want to do it directly in the database code and in the store script itself.
I wanted to ask for a hint where PrestaShop stores links to images of products shown on the page.

What I want to do is I have a list of images on the server, I have a table with links product => image(link).

How to make the image display properly in Presta.

thank you in advance for your help, thank you also for offers like I will do it for a fee. I want to learn this script and I can't find it in the documentation.

Link to comment
Share on other sites

Hi @TomaszMyszak,

Prestashop does not store the image url, it assigns images to the products based on productId, and stores the saved Prestashop image_id -> product_id corelation in the  table ps_image_lang , and also saves image information to tables ps_image_shop and ps_image_lang 

Also the images are being uploaded to the folder /img/p/X/X/X/X in format: example image id 1357.jpg will be placed in folder img/p/1/3/5/7/1357.jpg and the other image types  with the different resolutions will be in this same folder.

I hope that I could help.
Have a nice day, Leo.

Link to comment
Share on other sites

4 hours ago, Prestachamps said:

Hi @TomaszMyszak,

Prestashop does not store the image url, it assigns images to the products based on productId, and stores the saved Prestashop image_id -> product_id corelation in the  table ps_image_lang , and also saves image information to tables ps_image_shop and ps_image_lang 

Also the images are being uploaded to the folder /img/p/X/X/X/X in format: example image id 1357.jpg will be placed in folder img/p/1/3/5/7/1357.jpg and the other image types  with the different resolutions will be in this same folder.

I hope that I could help.
Have a nice day, Leo.

thank you for answer, that im looking for

Link to comment
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
×
×
  • Create New...