Zen Follower
- Join Date:
- Jun 2004
- Posts:
- 118
- Plugin Contributions:
- 0
Easy Populate 1.2.5.4 support
prosam:
I am going to use EP to upload over 8,000 products to my site 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 zen_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
I can't even find the zen_image function file for the life of me.
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
//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:
if (!file_exists($src)) {
$src = DIR_WS_IMAGES . PRODUCTS_IMAGE_NO_IMAGE;
}
This will replace any broken product images with the no image file.