Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Info Box Contents


bobtech99

Recommended Posts

Let's Try this again. When I first ask how this is done I got nothing back. then I posted and ask how do I do this and I got

 

strip the codes so as to not have the infobox array setup here is a starter

 

I then Replied Needed more help then that..

 

So I guess let me ask in another way.

 

What I am Trying to do without to much rework to the whole site is this.

I want to change Just a couple of colum boxes to fit the look of my header thus removing the colum boxex from the left or right. Now to do this I need to figure out

what to change for example

 

 

This is what it looks like from original install

Manufactures_Original.gif

 

 

This is what I am going for No Tables No Borders No Color just a

Plan Looking Drop Down Form I can set into the header

manufactures_Moded.gif

Link to comment
Share on other sites

You can add this to your header:

 

 

<?php
?$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

// 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']);
? ? ? ?$manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'text' => $manufacturers_name);
? ? ?}

? ? ? ? echo tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get');
? ? ? ? echo 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();

?>
? ? ? ? ? ?</td>
? ? ? ? ?</tr>
<!-- manufacturers_eof //-->
<?php
?}
?>

 

Matti

Link to comment
Share on other sites

Thank you that works.. do i do the same for Categories?

 

 

 

You can add this to your header:

<?php
?$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

// 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']);
? ? ? ?$manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'text' => $manufacturers_name);
? ? ?}

? ? ? ? echo tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get');
? ? ? ? echo 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();

?>
? ? ? ? ? ?</td>
? ? ? ? ?</tr>
<!-- manufacturers_eof //-->
<?php
?}
?>

 

Matti

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...