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?
Latest News: (loading..)
used 2.3.1 admin to update store_logo, now logo will not show
Started by mbuswell, Sep 17 2011, 08:11
store_logo
3 replies to this topic
#1
Posted 17 September 2011, 08:11
#2
Posted 17 September 2011, 13:21
The default code looks like this:
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.
<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.
"Headers already sent" - The definitive help
"Cannot redeclare ..." - How to find/fix it
SSL Implementation Help
Like this post? "Like" it again over there >
"Headers already sent" - The definitive help
"Cannot redeclare ..." - How to find/fix it
SSL Implementation Help
Like this post? "Like" it again over there >
#3
Posted 18 September 2011, 05:09
sorry I was probably not clear, the code is intact.
the generate code in the html is
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
so that means this part must be returning false
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
<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
Edited by mbuswell, 18 September 2011, 05:19.
#4
Posted 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.














