Jump to content

Product Images


Recommended Posts

I am trying to modify the adminProducts.php in BO to chaneg the directory all product images are uploaded to because when the store starts having many items the prestashop/img/p/ directory ends up having soooooo many images that slowes down the server, and making regenerating thumbnails almost imposible,
so I want to modify the way prestashop uploads products images and split al the images in prestashop/img/p/ into subdirectories ( to make sure that each directory have a mangable number of files )
and I cant find the code that is actually responsible for adding/ the product to the database
can someone help sirecting me to where to find this part that I can change to upload the product images into subdirectories

I know i can change the name of the directory from config/ but I actually want to end up with prestashop/img/p/1/images.jpg having images for items from 1 to 100
prestashop/img/p/2/images.jpg having images for items from 101 to 200
prestashop/img/p/3/images.jpg having images for items from 201 to 300

or

prestashop/img/p/cat1/images.jpg having images for items for cat1
prestashop/img/p/cat2/images.jpg having images for items for cat2
prestashop/img/p/cat3/images.jpg having images for items for cat3

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
  • 11 months later...
×
×
  • Create New...