This is the support thread for the Image Purge plugin
https://www.zen-cart.com/downloads.php?do=file&id=1690
Image Purge identifies and optionally deletes files in your /images folder which are no longer associated with products.
This is the support thread for the Image Purge plugin
https://www.zen-cart.com/downloads.php?do=file&id=1690
Image Purge identifies and optionally deletes files in your /images folder which are no longer associated with products.
Last edited by swguy; 23 Jun 2021 at 01:41 PM.
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
line 125 seems to have a problem. i think it should be:
i suppose you could cast it to integer as well.... but $products_id is not defined.PHP Code:
$result2 = $db->Execute ( "SELECT products_name FROM " . TABLE_PRODUCTS_DESCRIPTION . " WHERE products_id = " . $result->fields[products_id] . " LIMIT 1");
not sure about getting a language either... as the name could be in a random language if one has multiple languages on the site.
Yep, you're right. Will fix in next update; should be a continue after the automatic deletion as well.
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
You can now handle additional images in one of three ways:
- 'none' - no checks for additional images. Additional images will be marked for deletion.
- 'basic' - looks for additional images following the naming scheme of appending _## to the base image name (i.e. _00 to _99).
- 'full' - uses the full Zen Cart additional image name construction to see if a file qualifies as an additional image.
The default is 'full'.
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Update: check to be sure an image identified as an orphan is not actually a category or manufacturer image.
This is required for sites that store category or manufacturers images directly under the /images folder.
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
hi, when i run the script i get a time out after a while. i believe it is because i have so many images, like 15000. what would be your suggestion for changes in the php.ini settings to avoid the time out.
also, since there are so many images, i have my images folder set like this /images/MFG1/, /images/MFG2/, etc. instead of putting 15000 images under the /images/ directory which would take forever to load in ftp. will this script work for this kind of scenario. thanks so much for making this useful hack for everyone to use.
Bookmarks