keweli Posted July 25, 2011 Share Posted July 25, 2011 I am running a script for all the images. But the problem is that the image URL is different sometimes e.g. http://www.iparadise.com.au/46-92-large/iphone-4-crystal-clear-screen-protector-pack-of-2.jpg 46 is the product id and 92 is the image id However, sometimes it doesn't need the product id. e.g. http://www.iparadise.com.au/778-large/ipad-2-leather-flip-case-stand-brown.jpg Why are there such differences? I want to make them into 1 format. Thanks Link to comment Share on other sites More sharing options...
shokinro Posted July 25, 2011 Share Posted July 25, 2011 You are using SEO feiendly url of the images. I suggest you use the original image url. all related images should be under /img folder. images for product is under /img/p images for category isunder /img/c images for manufacturer is under /img/m and so on... the image name format is also different for product, category,manufacturer,... productid-imageid-size.jpg categoryid-size.jpg hope this gives you some hints. Link to comment Share on other sites More sharing options...
keweli Posted July 25, 2011 Author Share Posted July 25, 2011 I realised the problem was because I upgraded prestashop versions with some pictures uploaded before and some after. The new format is just imageId-large without product-Id. Folders are separated for every numerical digit. Anyway, I have managed to write a PHP script renaming all the images in the p directory and classifying them into the proper folders. All images URLs are now consistent for me. Link to comment Share on other sites More sharing options...
shokinro Posted July 25, 2011 Share Posted July 25, 2011 yes you are right, in new version 1.4x, it only use image id now. Link to comment Share on other sites More sharing options...
venkatesh Posted December 30, 2011 Share Posted December 30, 2011 what is the code to get image id and how to display category image with code i.e. without using any module. any one? hope u clarified. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts