Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Mznufacturers product listing page


Recommended Posts

Hi all

 

I have just discovered that the heading for any of my Manufacturers page has gone missing. ie click say Samsung in the manufacturers drop down box, the page listing the Samsung products appears, but no heading. When using Firebug in FireFox I see <h1><,/h1> so at some stage I must have "deleted" or maybe commented out some code, but from which file I have no clue. I have searched perhaps obvious file index.php, product_listing.php advanced_search.php

 

Can someone give me a clue where I could search

 

Many thanks

Grandpa

Link to comment
Share on other sites

index.php file around line 160

Make sure you have this code inside it.

    $catname = HEADING_TITLE;
    if (isset($HTTP_GET_VARS['manufacturers_id']) && !empty($HTTP_GET_VARS['manufacturers_id'])) {
      $image = tep_db_query("select m.manufacturers_image, m.manufacturers_name as catname, mi.manufacturers_description as catdesc from manufacturers m, manufacturers_info mi where m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "'");
      $image = tep_db_fetch_array($image);
      $catname = $image['catname'];
    } elseif ($current_category_id) {
      $image = tep_db_query("select c.categories_image, cd.categories_name as catname, cd.categories_description as catdesc from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
      $image = tep_db_fetch_array($image);
      $catname = $image['catname'];
    }
?>

<div class="page-header">
  <h1><?php echo $catname; ?></h1>
</div>
Link to comment
Share on other sites

@@Tsimi

 

Hi Lambros

 

Thanks for the code, unfortunately I have that code , so still no solution. Its more than likely some code I may have changed/amended at some stage.

No biggy may just leave it.

 

Many thanks

 

Grandpa

Link to comment
Share on other sites

Check your Maisto manufacturers page. It seems to be showing the manufacturers name as a heading. Saying that it is the only one that is.

 

I would check that the manufacturers name has been saved into the manufacturers table in the database. If it has, then god knows where to look, as one page seems to be working correctly.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

@@14steve14

 

Hi Steve

 

Thanks for that.

Checked the manufacturers name in the DB. All seem to be there so, as you say, "god knows where to look". Very strange.

 

Many thanks

 

Cheers

 

Grandpa

Link to comment
Share on other sites

@@burt@@14steve14

 

Hi Guys

 

Thanks for your comments.

I changed he following in index.php and all works, don't know whether this code  is OK or not, but it solves the problem, hopefulyy it hasn't created other problems.

 

Changed

$catname = HEADING_TITLE;
    if (isset($HTTP_GET_VARS['manufacturers_id']) && !empty($HTTP_GET_VARS['manufacturers_id'])) {
      $image = tep_db_query("select m.manufacturers_image, m.manufacturers_name as catname, mi.manufacturers_description as catdesc from manufacturers m, manufacturers_info mi where m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "'");
      $image = tep_db_fetch_array($image);
      $catname = $image['catname'];
    } elseif ($current_category_id) {
      $image = tep_db_query("select c.categories_image, cd.categories_name as catname, cd.categories_description as catdesc from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
      $image = tep_db_fetch_array($image);
      $catname = $image['catname'];
    }

To this

 $catname = HEADING_TITLE;   
    if (isset($HTTP_GET_VARS['manufacturers_id']) && !empty($HTTP_GET_VARS['manufacturers_id'])) {
      $image = tep_db_query("select manufacturers_image, manufacturers_name as catname from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
      $image = tep_db_fetch_array($image);
      $catname = $image['catname'];
    } elseif ($current_category_id) {
      $image = tep_db_query("select c.categories_image, cd.categories_name as catname from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
      $image = tep_db_fetch_array($image);
      $catname = $image['catname'];
    

Changes are in lines 3 and 7

 

Many thanks

 

Grandpa

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...