Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


mbuswell

Recommended Posts

I installed 2.3.1 fresh install. I changed my store logo using the admin interface option. Prior to doing this I had the normal OScommerce logo showing fine.

After uploading a new logo in png format, the logo no longer shows.

 

The code presents as

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

 

The file is present in the right location on the server and has permissions of 777.

 

it appears as though tep_image function will return blank if it cannot find the file, but the file is definately there.

 

anyone else have this problem, or any ideas?

Link to comment
Share on other sites

The default code looks like this:

 

  <div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></div>

 

Judging by what you've posted I'd say you've removed the tep_image() part by mistake.

 

Unless you want to take down the .htaccess protection on the site youi'll have to solve this on your own.

 

No one but you can see the site and the page source to determine exactly what the problem is.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...