Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,974
    Plugin Contributions
    109

    Default Image Purge Support Thread

    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 Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.

  2. #2
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,042
    Plugin Contributions
    5

    Default Re: Image Purge Support Thread

    line 125 seems to have a problem. i think it should be:

    PHP Code:
    $result2 $db->Execute "SELECT products_name FROM " TABLE_PRODUCTS_DESCRIPTION " WHERE products_id = " $result->fields[products_id] . " LIMIT 1"); 
    i suppose you could cast it to integer as well.... but $products_id is not defined.

    not sure about getting a language either... as the name could be in a random language if one has multiple languages on the site.
    help with WCAG is now here! PM if you want some help with this. (or any ZC issue).
    if you feel so inclined, feel free to send some cake....

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,974
    Plugin Contributions
    109

    Default Re: Image Purge Support Thread

    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 Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,974
    Plugin Contributions
    109

    Default Re: Image Purge Support Thread

    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 Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,974
    Plugin Contributions
    109

    Default Re: Image Purge Support Thread

    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 Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.

  6. #6
    Join Date
    Mar 2015
    Posts
    124
    Plugin Contributions
    0

    Default Re: Image Purge Support Thread

    Quote Originally Posted by swguy View Post
    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.
    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.

  7. #7
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,974
    Plugin Contributions
    109

    Default Re: Image Purge Support Thread

    Don't change php.ini; change the script itself. Right now you'll see it does the calls to ini_set and set_time_limit - just multiply those numbers by 20 and rerun it. Be sure you also have adequate memory.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.

  8. #8
    Join Date
    Mar 2015
    Posts
    124
    Plugin Contributions
    0

    Default Re: Image Purge Support Thread

    Quote Originally Posted by swguy View Post
    Don't change php.ini; change the script itself. Right now you'll see it does the calls to ini_set and set_time_limit - just multiply those numbers by 20 and rerun it. Be sure you also have adequate memory.
    thank you for taking time out of your busy schedule to answer this. have a great weekend

  9. #9
    Join Date
    Jan 2015
    Posts
    284
    Plugin Contributions
    0

    Default Re: Image Purge Support Thread

    I would like to use this plugin but i cant figure out how to get it to work with my image structure.

    My image folders are as followed

    images/images_folder_1/
    images/images_folder_2/
    images/image_etc....../

    Is there a way i can use this plugin with the file structure above. I need to be able to purge multiple folders at one time?

  10. #10
    Join Date
    Jan 2015
    Posts
    284
    Plugin Contributions
    0

    Default Re: Image Purge Support Thread

    Anyone have any ideas on my previous posting

    I would like to use this plugin but i cant figure out how to get it to work with my image structure.

    My image folders are as followed

    images/images_folder_1/
    images/images_folder_2/
    images/image_etc....../

    Is there a way i can use this plugin with the file structure above. I need to be able to purge multiple folders at one time?

 

 

Similar Threads

  1. v155 Image Handler 5 (for v1.5.5) Support Thread
    By lat9 in forum All Other Contributions/Addons
    Replies: 477
    Last Post: 5 Sep 2021, 05:29 PM
  2. Attribute image replaces main product image on select [Support Thread]
    By exoticcorpse in forum All Other Contributions/Addons
    Replies: 158
    Last Post: 24 Aug 2020, 05:07 PM
  3. Rotating Image Slider [Support Thread]
    By picaflor-azul in forum All Other Contributions/Addons
    Replies: 21
    Last Post: 8 Jun 2018, 02:16 AM
  4. AJAX IMAGE Swapper support thread
    By jaycode in forum All Other Contributions/Addons
    Replies: 785
    Last Post: 13 Jan 2016, 11:48 PM
  5. Image Titles Support Thread
    By gjh42 in forum All Other Contributions/Addons
    Replies: 155
    Last Post: 9 Sep 2014, 04:51 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR