Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

manufacturers.php problem


Guest

Recommended Posts

Hi I am new here, have browsed a lot in the forums and decided to join as I have a question...

 

Added some new manufacturers in the Admin area and now in shop web pages there is a drop down box instead of an image with links I had previously added in the left colum -

 

Can anyone tell me why the image added in manufacturers.php is not displaying but the drop down box is instead?? -

 

Can't see any options in the admin area so looked in the code, but not really sure what to change - if this is how to sort it out...

 

(would really appreciate any help, am quite confused, many thanks in advance.)

<?php
/*
 $Id: manufacturers.php,v 1.19 2003/06/09 22:17:13 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
 if ($number_of_rows = tep_db_num_rows($manufacturers_query)) {
?>
<!-- manufacturers //-->
	  <tr>
		<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_MANUFACTURERS);

new infoBoxHeading($info_box_contents, false, false);

if ($number_of_rows <= MAX_DISPLAY_MANUFACTURERS_IN_A_LIST) {
// Display a list
  $manufacturers_list = '';
  while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
	$manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);
	if (isset($HTTP_GET_VARS['manufacturers_id']) && ($HTTP_GET_VARS['manufacturers_id'] == $manufacturers['manufacturers_id'])) $manufacturers_name = '<b>' . $manufacturers_name .'</b>';
	// BOF TERRY PROBERT MOD - IGNORE ID 19 (browse by Type)
	if($manufacturers['manufacturers_id'] != 19){
	$manufacturers_list .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id']) . '">' . $manufacturers_name . '</a><br>';
	}
	// EOF TERRY PROBERT MOD - IGNORE ID 19 (browse by Type)
  }

  $manufacturers_list = substr($manufacturers_list, 0, -4);

  $info_box_contents = array();
   //$info_box_contents[] = array('text' => $manufacturers_list);
  $TWP_manufacturers_box = '<img src="http://www.vanessalove.co.uk/images/left-side-logos.jpg" width="170" height="300" border="0" usemap="#ManufacturerMap" />';
  $TWP_manufacturers_box .= '<map name="ManufacturerMap" id="ManufacturerMap">';
  $TWP_manufacturers_box .= '<area shape="rect" coords="3,1,166,74" href="dreamgirl-m-14.html" alt="Dreamgirl" title="Dreamgirl" />';
  $TWP_manufacturers_box .= '<area shape="rect" coords="3,94,167,141" href="hustler-m-15.html" alt="Hustler" title="Hustler" />';
  $TWP_manufacturers_box .= '<area shape="rect" coords="3,162,167,239" href="vacari-m-17.html" alt="Vacari" title="Vacari" />';
  $TWP_manufacturers_box .= '<area shape="rect" coords="3,250,167,293" href="allure-m-16.html" alt="Allure Leather" title="Allure Leather" />';
  $TWP_manufacturers_box .= '</map>';
  $info_box_contents[] = array('text' => $TWP_manufacturers_box);
} else {
// Display a drop-down
  $manufacturers_array = array();
  if (MAX_MANUFACTURERS_LIST < 2) {
	$manufacturers_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT);
  }

  while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
	$manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);
  		// BOF TERRY PROBERT MOD - IGNORE ID 19 (browse by Type)
	if($manufacturers['manufacturers_id'] != 19){
	$manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],
								   'text' => $manufacturers_name);
	}
	// EOF TERRY PROBERT MOD - IGNORE ID 19 (browse by Type)
  }

  $info_box_contents = array();
  $info_box_contents[] = array('form' => tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get'),
							   'text' => tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $HTTP_GET_VARS['manufacturers_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" style="width: 100%"') . tep_hide_session_id());
}

new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- manufacturers_eof //-->
<?php
 }
?>

Link to comment
Share on other sites

VERY non-standard code, so hard to say.

 

Would suggest that you need to make the manufacturer list setting in your admin area a bigger number.

Thank you burt, I will try that now. :)

Link to comment
Share on other sites

Would suggest that you need to make the manufacturer list setting in your admin area a bigger number.

Where do/how do I do this burt? - sorry for the ignorance, new to all this.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...