Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    135
    Plugin Contributions
    0

    Default If Image is not Found Display no_image.gif

    I'm importing over 8,000 products into my site via an excel file and even though most product images will be named according to their product number I'm sure there will be some that do not get named correctly or are not found at all so I would like the no_image gif to show up instead of a broken image.

    I know there has to be a modification done to the image_function file I'm just not sure how, I'm not much of a php coder, I can understand it but cannot write it. Something like if image not found display no_image.gif

    Can anyone help, please?

  2. #2
    Join Date
    Jun 2004
    Posts
    135
    Plugin Contributions
    0

    Default Re: If Image is not Found Display no_image.gif

    Ok I found the answer to my question and here it is if anybody else needs it. This worked in ZC 1.3.8 not sure about the older or newer versions coming out.

    In includes/functions/html_output.php after
    Code:
    //auto replace with defined missing image
        if ($src == DIR_WS_IMAGES and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {
          $src = DIR_WS_IMAGES . PRODUCTS_IMAGE_NO_IMAGE;
        }
    Enter the following:
    Code:
    	if (!file_exists($src)) {
          $src = DIR_WS_IMAGES . PRODUCTS_IMAGE_NO_IMAGE;
    	}
    This will replace any broken product images with the no image file.

  3. #3
    Join Date
    Jun 2004
    Posts
    135
    Plugin Contributions
    0

    Default Re: If Image is not Found Display no_image.gif

    UPDATE: The above instructions work but I had not realized there are 2 instances of the original lines of code so just make sure add the snippet after the second instance of the code (line 191 on my file).

 

 

Similar Threads

  1. NO_PICTURE.GIF will not display
    By Logwash in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 28 May 2008, 06:36 PM
  2. New headerbg.gif image not displaying
    By CJ Internet Sales in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 13 Apr 2007, 02:29 PM
  3. button_sold_out_sm.gif not known gif
    By bikemike in forum General Questions
    Replies: 2
    Last Post: 3 Dec 2006, 01:03 PM

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