Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

infobox header for manufacturer


Guest

Recommended Posts

In the info box for "manufacturer info, I would like the infobox header to reflect the name of the manufacturer. This is the code for the manufacturer info box.

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_MANUFACTURER_INFO);

 

new infoBoxHeading($info_box_contents, false, false);

 

$manufacturer_info_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0">';

if (tep_not_null($manufacturer['manufacturers_image'])) $manufacturer_info_string .= '<tr><td align="center" class="infoBoxContents" colspan="2">' . tep_image(DIR_WS_IMAGES . $manufacturer['manufacturers_image'], $manufacturer['manufacturers_name']) . '</td></tr>';

if (tep_not_null($manufacturer['manufacturers_url'])) $manufacturer_info_string .= '<tr><td valign="top" class="infoBoxContents">- </td><td valign="top" class="infoBoxContents"><a href="' . tep_href_link(FILENAME_REDIRECT, 'action=manufacturer&manufacturers_id=' . $manufacturer['manufacturers_id']) . '" target="_blank">' . sprintf(BOX_MANUFACTURER_INFO_HOMEPAGE, $manufacturer['manufacturers_name']) . '</a></td></tr>';

$manufacturer_info_string .= '<tr><td valign="top" class="infoBoxContents">- </td><td valign="top" class="infoBoxContents"><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer['manufacturers_id']) . '">' . BOX_MANUFACTURER_INFO_OTHER_PRODUCTS . '</a></td></tr>' .

'</table>';

 

$info_box_contents = array();

$info_box_contents[] = array('text' => $manufacturer_info_string);

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- manufacturer_info_eof //-->

<?php

Link to comment
Share on other sites

$info_box_contents[] = array('text' => BOX_HEADING_MANUFACTURER_INFO);

 

Where the heading information is called,, I would like the name of the manufacturer which I think is derived from a selct statement:

 

$manufacturer_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "'), " . TABLE_PRODUCTS . " p where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.manufacturers_id = m.manufacturers_id");

 

The question is how do I place m.manufacturers_name where the BOX_HEADING_MANUFACTURER_INFO is located.

 

TIA TOM

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...