Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / NO_PICTURE.GIF will not display

NO_PICTURE.GIF will not display

Locked

Views: 4,495

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
14 Jan 2008, 7:19 PM
#1
logwash avatar

logwash

New Zenner

Join Date:
Oct 2007
Location:
Poughkeepsie, NY
Posts:
5
Plugin Contributions:
0

NO_PICTURE.GIF will not display

Hello. I am currently trying to have no_picture.gif display when there is a missing image from our database of products. At the moment the only thing that displays in the event of there being a missing image is a repeat of the name of the product. I set up all the necessary fields in the admin:

Configuration >> Images >> Product Image - No Image Status set to 1
Configuration >> Images >> Product Image - No Image Picture set to no_picture.gif

no_picture.gif is located in my public_html/images directory. It still will not display for some reason. I've been checking the forums but can't seem to find a resolution to the problem. I've seen others that have the same problem. Any help would be appreciated. Thanks.

Logwash

14 Jan 2008, 8:52 PM
#2
tshooters avatar

tshooters

Totally Zenned

Join Date:
Dec 2005
Posts:
1,037
Plugin Contributions:
2

Re: NO_PICTURE.GIF will not display

What's your setting in Admin/Configuration/Images/Image Required?
If set to false, it needs to be changed to true for the no_picture.gif to display.

15 Jan 2008, 3:34 PM
#3
logwash avatar

logwash

New Zenner

Join Date:
Oct 2007
Location:
Poughkeepsie, NY
Posts:
5
Plugin Contributions:
0

Re: NO_PICTURE.GIF will not display

Tried that. That setting was already correct. Still no dice.

Logwash :frusty:

15 Jan 2008, 5:27 PM
#4
dibeachdude avatar

dibeachdude

New Zenner

Join Date:
Oct 2007
Posts:
4
Plugin Contributions:
0

Re: NO_PICTURE.GIF will not display

I have some additional information that might help an experienced Zenner to troublehsoot this problem (at least in my case). I created my products table(s) in another application and uploaded it to MySQL. I included an image NAME for all products even though I don't have pictures for every item yet. This allows me to simply upload the images as they become available without having to go into each product and add the images one by one. So, the filename is present; however, the file is not. These products do not display "no_picture.gif"; it only displays the filename. Does anyone know a wya to correct this problem.

16 Jan 2008, 4:14 PM
#5
logwash avatar

logwash

New Zenner

Join Date:
Oct 2007
Location:
Poughkeepsie, NY
Posts:
5
Plugin Contributions:
0

Re: NO_PICTURE.GIF will not display

To clarify the last post from DiBeachDude, I also am running the Easy Populate module (assuming that's what you meant). I use the product SKU ID as the filename for each pic in the product_image field. We have over 30,000 products most of which have images that are displaying fine, but as DiBeachDude stated the products that have a filename associated with them but do not have a physical file to go with the entry are not displaying the NO_PICTURE.GIF file. Is this an issue with Easy Populate, and if so how could I possibly deal with it? Thanks in advance.

Logwash

16 Jan 2008, 4:28 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: NO_PICTURE.GIF will not display

Empty products_image will use the no image ... and you can turn off the required ...

However, to show the no image when an image is missing but defined you would need to alter the zen_image function slightly around this section of 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;
    }

by setting a condition that when the image is missing but defined it also shows the no image ...

Be careful as the template also uses this function and you don't want to confuse the evaluation of the testing ...

16 Jan 2008, 8:04 PM
#7
logwash avatar

logwash

New Zenner

Join Date:
Oct 2007
Location:
Poughkeepsie, NY
Posts:
5
Plugin Contributions:
0

Re: NO_PICTURE.GIF will not display

That snippet is already in HTML_OUTPUT.HTML is there something I should add to the code to make it display the no_picture.gif file? Sorry, I'm fairly new to PHP. Thanks.

Logwash

18 Jan 2008, 2:31 AM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: NO_PICTURE.GIF will not display

That is where approximately in the code you would need to add a change to the code ...

I have not had time to break down the code changes to manage this and not break other images at the same time ...

28 May 2008, 5:36 PM
#9
rohitsoftech avatar

rohitsoftech

New Zenner

Join Date:
Dec 2007
Posts:
6
Plugin Contributions:
0

Re: NO_PICTURE.GIF will not display

Add this text in html_output.php functions below
//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;
}
if (!file_exists($src)) {
$src = DIR_WS_IMAGES . PRODUCTS_IMAGE_NO_IMAGE;
}