Jump to content

Image Item number change from original in server.


kentcheung2000

Recommended Posts

Hi,

 

I am new to prestashop....

 

My image item number is "dec900.jpg".  When I create this product in prestashop, the id is "15".  I go into the server, it becomes "30.jpg" in the folder img/p/3/0. 

 

I am trying to create a Filemaker Web API to upload the images to prestashop, and I need to figure out how it is done regarding the image numbering mechanism.  Can anyone help me there...Thanks.

 

KC

Edited by kentcheung2000 (see edit history)
Link to comment
Share on other sites

Nice question.

 

In PrestaShop, there is a table ps_image and its primary key is your image name. So in 30.jpg, 30 is id_image from ps_image table.

 

Now, in ps_product_image table there will be relation between product and image. id_product => id_image

 

Your main question is where to store it. Product images will be stored in img/p folder and it will be arranged in really good pattern. Let me explain by example. If id_image is 30 then it will be in img/p/30/30.jpg let me give you more example which will make things clear without words

 

240.jpg => img/p/2/4/0/240.jpg

3455.jpg => img/p/3/4/5/5/3455.jpg

500 => img/p/5/0/0/500.jpg

 

Did you noticed directory path? It is digits of actual number. just scatter digits of id_image to know where to store that image. Did you understand? Any confusion now?

  • Like 1
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...