Hello,

I am using a contribution called Manufacture's About that enables the use of a description box for manufactures (I use it for Artist's bios) in the admin, and then set up a Manufacture's Page with an image and the aforementioned description. The template page also includes two links:

1. to all products by such manufactures, and
2. To a Manufacture's external URL page IF specified in the admin page.

Everything work for me except the links. The template somehow is not pulling in the SQL data from the Manufacture's table (created by the contribution). Here is the code of the template file:

Code:
<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers                           |
// |                                                                      |
// | http://www.zen-cart.com/index.php                                    |
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | [email protected] so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id: manufacturers_about_default.php  v1.2.3.0 2005-01-04 langer $
//
?>

<table  width="100%" border="0" cellspacing="8" cellpadding="2">
  <tr>
    <td class="breadCrumb" colspan="2"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></td>
  </tr>
  <tr>
    <td class="pageHeading" colspan="2"><h1 id="indexCategoriesHeading"><?php echo HEADING_TITLE; ?></h1></td>
  </tr>
  <tr>
<?php
  $content = '<td nowrap="nowrap" valign="top" class="ArtistOtherInfo">';
	if (zen_not_null($manufacturers_about->fields['manufacturers_image'])) {
	  $content .= '<div align="left" class="main-image">' . zen_image(DIR_WS_IMAGES . $manufacturers_about->fields['manufacturers_image'], $manufacturers_about->fields['manufacturers_name']) . '</div>';
	  }
	if (zen_not_null($manufacturers_about->fields['manufacturers_url'])) {
	  $content .= '<div id="ArtistOtherInfo"><li><a href="' . zen_href_link(FILENAME_REDIRECT, 'action=manufacturer&manufacturers_id=' . $manufacturers_about_id) . '" target="_blank">' . sprintf(BOX_MANUFACTURER_INFO_HOMEPAGE, $manufacturers_about->fields['manufacturers_name']) . '</a></li></div>';
	  }
	$content .= '<div id="ArtistOtherInfo"><li><a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers_about_id) . '">' . BOX_MANUFACTURER_INFO_OTHER_PRODUCTS . '</a></li></div></td>';
  if (($manufacturers_about->fields['manufacturers_about'])) {
  	$content .= '<td class="infoBox" valign="top">' . ($manufacturers_about->fields['manufacturers_about']) . '</td>';
  } else {
  $content .= '<td class="infoBox">&nbsp;</td>';
  }
  echo $content;
?>
  </tr>
<?php if (TEXT_INFORMATION) { ?>
  <tr>
    <td class="main" colspan="2"><?php echo TEXT_INFORMATION; ?></td>
  </tr>
<?php } ?>
  <tr>
    <td class="main" colspan="2"><br /><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></td>
  </tr>
</table>
The query should come from the extra_functions file. This is it:

Code:
<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers                           |
// |                                                                      |
// | http://www.zen-cart.com/index.php                                    |
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | [email protected] so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id: functions_manufacturers_about.php v1.2.3.0 2005-01-04 langer $
//

//
// returns manufacturers about array
//

  function zen_get_manufacturers_about($manufacturers_about_id, $language = '') {
    global $db;
    // $manufacturers_about = array();

    if (empty($language)) $language = $_SESSION['languages_id'];

    $manufacturers_about_query = "select m.manufacturers_name, m.manufacturers_image,
                           mi.manufacturers_url, mi.manufacturers_about
                           from " . TABLE_MANUFACTURERS . " m
                           left join " . TABLE_MANUFACTURERS_INFO . " mi
                           on (m.manufacturers_id = mi.manufacturers_id
                           and mi.languages_id = '" . (int)$language . "')
                           where m.manufacturers_id = '" . (int)$manufacturers_about_id . "'";

    $manufacturers_about= $db->Execute($manufacturers_about_query);

    	// echo $manufacturers_about->fields['manufacturers_name'];

    return $manufacturers_about;
  }
?>
But somehow, the links are not working. They are missing the ID:

Code:
<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers_about_id) . '">
Can anyone give me hint on how to to create a query to make sure that the field ID from table manufacturers_about is actually pass through to the template file?

I am not a programmer, but I use common sense and I am patient.

Thanks for your help.