Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Feb 2009
    Posts
    419
    Plugin Contributions
    0

    help question Is there a way to search for product images that are no longer linked?

    Long story short, I have reconnected with a client who has a very large online store. At one point, when I wasn't in charge of it, there were too many inexperienced hands in the pot and product images (and other kinds of images) were saved all over the place within the website's file structure (inside and outside of the cart's files).

    Is there ANY script/program/suggestion to run on the website to get a list of image files that are currently no longer linked (whether static images, product images, category images, website banners, etc etc - any kind of image anywhere on the site). I need to clean up the site's storage and also the bloated database.

    I know there are easily 100s of images that are no longer being used, but because people didn't name images correctly (to easily identify them) and many were placed in the site's root ... I have no idea which ones are being used or not.

    I know I'll have to almost literally go through each of the store's 5,500+ products and check to see where the product images were saved (as I had setup up sub-folders to sub-divide product images, but no one continued to do that) ... and moved and re-link those product images that were uploaded to the wrong places.

    Any ideas would be greatly appreciated.

  2. #2
    Join Date
    Feb 2009
    Posts
    419
    Plugin Contributions
    0

    Default Re: Is there a way to search for product images that are no longer linked?

    Just wanted to thank the mod who edited my thread title. My mind is going a mile-a-minute trying to work on this client's store, getting it back to where it should be in the rankings (they significantly dropped during my 2 year absence from being their webmaster). I meant to go back and finish my brain fart for the thread title, but forgot! LOL Thanks again.

  3. #3
    Join Date
    Feb 2009
    Posts
    419
    Plugin Contributions
    0

    Default Re: Is there a way to search for product images that are no longer linked?

    Anyone?

    I'm slowly going through the product images one by one as I update each product's meta tags.

    Slowly .....

    I did notice that additional images are not being deleted when a product is deleted (only the product's main initial image). Image Handler 2 is installed and used on this cart. I guess that's alright. I have Filezilla open and as I delete the pictures from my side (my computer), I'm making sure the main image is deleted from the site and also delete the additional images. Just curious as to why they are not deleting when the product is deleted.

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Is there a way to search for product images that are no longer linked?

    No idea about IH functionality, intended or actual, but as additional images are not associated programmatically but merely recognized when searched for by naming conventions, it would be significantly more time-consuming as well as potentially overreaching to delete all images that fit the "additional" profile for a product's main image when deleting that image. The "delete matching additional images" function could be written, but obviously wasn't in the initial setup for whatever reasons there were.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Is there a way to search for product images that are no longer linked?

    Not sure if this is useful to your situation: http://www.zen-cart.com/downloads.php?do=file&id=1331
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Is there a way to search for product images that are no longer linked?

    Or this one, which I've just packaged and submitted after retrieving from some very old archives:
    http://www.zen-cart.com/downloads.php?do=file&id=1690
    (Consider it beta and untested)
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Feb 2009
    Posts
    419
    Plugin Contributions
    0

    Default Re: Is there a way to search for product images that are no longer linked?

    Glen - Thank you for the IH2 info. =)

    DrByte -

    The 1st script you referenced, while not related to what I am currently doing, is extremely helpful later on down the process. The store has well over 5000 products ... it would be nice to know if any of them are missing their product image.

    I am currently going through categories/sub-categories that are no longer being used, meticulously deleting the products and their images ... and have found a few that didn't have a product image to begin with.

    The 2nd script you referenced sounds exactly up my alley. But, since you say it has been untested ... and I don't have the best of luck with untested anythings ... I'll continue my slow path until someone(s) has/have tested your script.

    Thanks to the both of you for your help. I'll bookmark this thread.

  8. #8
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

    Default Re: Is there a way to search for product images that are no longer linked?

    Why not run full backup then test the Doc's script? if it fails (I bet it won't) then simply restore DB and or files.

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Is there a way to search for product images that are no longer linked?

    The Image Purge Utility sounds like a great thing for a busy store to have. One question: does it delete additional images (which are not listed anywhere as belonging to a specific product)? Or does it try to match them with a "listed" product image before flagging/deleting?

  10. #10
    Join Date
    Dec 2011
    Posts
    19
    Plugin Contributions
    0

    Default Re: Is there a way to search for product images that are no longer linked?

    I have ran this script on a website and it looks like all the additional images are flagged as orphans.
    It would be nice to find a way around this.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 3
    Last Post: 19 Nov 2010, 12:45 AM
  2. Replies: 1
    Last Post: 6 Feb 2010, 02:51 PM
  3. Replies: 25
    Last Post: 24 Jul 2009, 10:57 PM
  4. Is there a way to mass delete attributes that are not being used?
    By GGWS in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 3 Jun 2007, 03:49 PM
  5. Replies: 5
    Last Post: 20 Mar 2007, 02:43 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