Jump to content


Corporate Sponsors


Latest News: (loading..)

mbuswell

Member Since 30 Aug 2006
Offline Last Active Sep 18 2011, 06:40
-----

Posts I've Made

In Topic: used 2.3.1 admin to update store_logo, now logo will not show

18 September 2011, 05:45

I have removed my logo and used a background image in my style sheet as well. this actually is better for my layout. but hopefully someone understands why that one IF statement fails.

In Topic: used 2.3.1 admin to update store_logo, now logo will not show

18 September 2011, 05:09

sorry I was probably not clear, the code is intact.
<div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></div>

the generate code in the html is

<div id="storeLogo"><a href="http://damnfinebooks.co.nz/bookstore-231/index.php"></a></div>


from that I guess the tep.image function is returning false.
There are two places tep.image will return false, so I tested and found that it is indeed returning false and in this part
	if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
	  if ($image_size = @getimagesize($src)) {
		if (empty($width) && tep_not_null($height)) {
		  $ratio = $height / $image_size[1];
		  $width = intval($image_size[0] * $ratio);
		} elseif (tep_not_null($width) && empty($height)) {
		  $ratio = $width / $image_size[0];
		  $height = intval($image_size[1] * $ratio);
		} elseif (empty($width) && empty($height)) {
		  $width = $image_size[0];
		  $height = $image_size[1];
		}
	  } elseif (IMAGE_REQUIRED == 'false') {
		return false;
	  }
	}

so that means this part must be returning false

if ($image_size = @getimagesize($src)) {


I set CONFIG_CALCULATE_IMAGE_SIZE to false, and the image is returned from tep.image now.

however the question still remains why after uploading an image using admin, this IF now is returning false