djpaul Posted June 11, 2012 Share Posted June 11, 2012 Hello, I am developing a program to insert products, categories and images. But i can't find where to add the image for the category. When i insert a new category I have used the tables: ps_category ps_category_lang ps_category_group And after the product is inserted, the table ps_category_product is also inserted. So, where or how does prestashop saves the cat image.. ? Thanks! Link to comment Share on other sites More sharing options...
phrasespot Posted June 13, 2012 Share Posted June 13, 2012 So, where or how does prestashop saves the cat image.. ? Nowhere. It is derived. It knows the category id, it also knows the location where category images are saved and what there are called. 1 Link to comment Share on other sites More sharing options...
djpaul Posted June 20, 2012 Author Share Posted June 20, 2012 Ah yeah. I see. Images goes to img/c/xx-home.jpg and so on. Unlike the product images, these are not stored in the DB. But 1 little other question: In the folder img/p where some folders 1, 2, 3, 4 and in there are also some folders. What do they mean? Link to comment Share on other sites More sharing options...
phrasespot Posted June 21, 2012 Share Posted June 21, 2012 Each image is given an id auto incremented in images table as you add an image to a product. In the old image system that id is used as part of the image name along with the product's id it belongs to and the image is placed in /img/p/ directory. Multiple copies of the image is created to cater for the types you specify in the back office and that information is also appended to the image name. So the 15th image you add to prestashop will have the names productid-15-typea.jpg, productid-15-typeb.jpg... The new image system uses a slightly different naming and location convention. The image base directory for product images is still /img/p/ directory. The type info is still appended to image names. Product id is not used and image id is split into directory names so e.g. 132nd image you add to PrestaShop will be used to create image types for various purposes and they have will have the names 132-typea.jpg, 132-typeb.jpg... and will be placed in /img/p/1/3/2/ directory. The image 132.jpg in the same directory is the image from which all other types created , e.g. when you regenerate images. Link to comment Share on other sites More sharing options...
nathanielleee Posted November 8, 2012 Share Posted November 8, 2012 If your in the table, there are the PS_img tables that you would have to import for the images to work. Sometimes its hit and miss depending on if your tranfering an old table to a new prestashop database. Link to comment Share on other sites More sharing options...
ssekazinga Posted December 8, 2013 Share Posted December 8, 2013 I made a fresh install of prestashop 1.5.6.1 and imported products and categories through the the database PhPmyadmin. For Hours i had missed out that images have references in the database till i saw this post of the PS-IMAGE Imported them and worked perfectly. Now i have afresh install with old products in Fresh environment from 1.4.x straight to 1.5.6.1 thank you Julius - Uganda 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