Rob's Ramblings

Saturday 26 October 2013

Prestashop - deleting redundant images.

One of the things I wrote when I first set up a webstore using Prestashop was a product import routine from one of our suppliers, that created the initial products.

Among other things, this included all the images for the product.

Now, the supplier provided separate thumbnail and large images in their links, which were dutifully imported. So each product ended up with two apparently identical images, but the second was bigger than the first! I'd not really bothered to clean this up, as it didn't really affect anything.

Now however, with eBay's new picture standards in the offing, and the standard prestashop eBay module being somewhat.. um... inflexible... (more on my work on this at a later date!) I've realised that I need to get rid of all these unnecessary images.

The end result is the rather simple little module below.  This will appear in the "Other Modules" category.  Once installed, and configure pressed, it will present you with a load of images!

Where a product has two (or more) images, numerically in sequence (so they were created at the same time) and the first is the cover picture, it will show the first two.  Alongside each pair is a checkbox, already ticked.

Scroll down .. If the pictures are the same, leave it ticked. If they are different, clear the tick.

If you press the submit at the bottom, it will delete the first image from the product for each line that you leave ticked.

This does for me.  It may not do for you.  Put your store into maintenance mode and make backups of your filesystem AND database before you even install this.  I offer this with no warranty whatsoever.  Do not complain if it all goes horribly wrong - just restore and then work out why.

Download ImgClean 1.0 here.

Labels: ,

1 Comments:

Post a Comment

Subscribe to Post Comments [Atom]



<< Home