Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Product Image Deleter


Recommended Posts

  • 2 weeks later...
  • 3 weeks later...

Im having some trouble with this contribution. I believe I have installed everything properly, I have the links in admin, and can click on the "submit" button to create the list. But I dont get a list after I click. Just a page that says "Images", nothing under it. I have tried testing it with a small amount of pictures in a test folder, with permissions set to 777. I tried it with one picture in a file and that didnt even work. In the admin/image_delete.php page, I believe I have directed the proper lines to the image folder, but I get no response, no error codes, no nothin'. What lines am I supposed to edit? 82,112,118? The default for these are 'images/Products/' My images are located in 'images/' and thats what I edited them to say. What am I missing? Those are the only changes I made, I feel like I am overlooking an edit somewhere. I have some 4955 images (including the auto generated thumbs) that I need to clean up, I only need 2700 of them, 900 if you dont count the two resizes (thumbs) for each pic. Any help would be greatly appreciated.



Link to comment
Share on other sites

To help those whose hosts still run PHP 4


In image_delete.php replace








// for PHP 4 versions

if (PHP_VERSION < 5) {

function scandir($dir) {

$dh = opendir($dir);

while (false !== ($filename = readdir($dh))) {

$files[] = $filename;



return $files;



Link to comment
Share on other sites

  • 2 months later...



i get this error message after the listing of the images and pressing the submit button to delete them:



Warning: Invalid argument supplied for foreach() in /is/htdocs/wp1084807_ZPBCDQY2B0/pages/metrius/admin/image_delete.php on line 64


Please help.




Link to comment
Share on other sites

  • 7 months later...



this is a good idea but i saw a lot of bugs.


1. all images in sub directoreys e.g. catalog/images/incon wil be deletet (if selected)


2. if your shop generate tumbs - this files will also be deleted (if selectet)


3. if you use e.g. "more pics" the additional produkt images will be also deleted (if selected)


4. for some images a error msg will be displayed:


Warning: unlink(C:/xampp/htdocs/os/catalog/images/10198_1_JPG) [function.unlink]: No such file or directory in C:\xampp\htdocs\os\catalog\admin\image_delete.php on line 82


a file 10198_1_jpg is not on file the original Nane was 101981.jpg




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...