Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Heading Image for Manufacturer Select


Guest

Recommended Posts

Someone else also mentioned this issue, but it still remains unsolved. (link to the post)

 

When I selected a manufacturer from the manufacturer drop-down menu ("Please select" on the top of menu list by default), it worked just fine - both M's page and M's logo shown correctly. But, after that, if I choose the default option ("Please select") from the menu, the "default page" loads up with the "default heading image" missing. If Netscape is used, the broken image box will disappear and change to the ALT phrase, such as "Let's see what we have here".

 

Here is

OSC's own demo, where you can see the problem (try switching around between a manufacturer and "Please select")

 

As shown in the url, there's no M's ID assigned (index.php?manufacturers_id= ) I guess that might be why no corresponding image could be displayed. I also checked the SQL tables for Manufacturer and Manufacturer_Info, there are also no entries for the "default ID" and the corresponding heading image.

 

Here is the image portion of the page codes from the demo linked above (not from the original php doc):

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">

          <tr>

            <td class="pageHeading">Let's See What We Have Here</td>

            <td align="right"><img src="images/" border="0" alt="Let's See What We Have Here" title=" Let's See What We Have Here " width="57" height="40"></td>

 

          </tr>

        </table>

 

Does any one have ideas about this? Or, someone can let me know which files are related to the heading image handling?

 

Thanks in advance!

 

- Orverda

Link to comment
Share on other sites

line 260 in index.php

 

// Get the right image for the top-right

$image = DIR_WS_IMAGES . 'table_background_list.gif';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");

$image = tep_db_fetch_array($image);

$image = $image['manufacturers_image'];

} elseif ($current_category_id) {

$image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

$image = tep_db_fetch_array($image);

$image = $image['categories_image'];

}

?>

 

 

// Get the right image for the top-right

$image = DIR_WS_IMAGES . 'table_background_list.gif';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

if (tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {

$image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");

$image = tep_db_fetch_array($image);

$image = $image['manufacturers_image'];

} else {

$image = 'put here your image';

}

} elseif ($current_category_id) {

$image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

$image = tep_db_fetch_array($image);

$image = $image['categories_image'];

}

?>

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Thanks Monika!

 

I found the spot at line 260, but didn't know how to deal with it. Your adding of IF 'tep_not_null' and ELSE '$image' works like a charm.

 

I really appreciate your quick reply and great help!

Link to comment
Share on other sites

Thanks Monika!

 

I found the spot at  line 260, but didn't know how to deal with it. Your adding of IF 'tep_not_null' and ELSE '$image' works like a charm. 

 

I really appreciate your quick reply and great help!

 

 

glad you got it to work!

 

I have removed those pics in my shop, so I never noticed the bug :-)

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...