Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hi

 

I'm trying to write a contribution that includes adding extra value to my product tables.

 

I can get the code to work with an input field - but would ideally like to change this to a dropdown list. The code that is in question is

 

 

	 <tr>
		<td class="main"><?php echo TEXT_PRODUCTS_SURFER_RECOMMENDED_WEIGHT; ?></td>
		<td class="main">


  <?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('surferRecWeight', $pInfo->surferRecWeight); ?></td>
	  </tr>

 

 

so instead of using tep_draw_input_field - i would like to use tep_draw_pull_down_menu. I know that the second arguement for the function tep_draw_pull_down_menu needs to be my array for the drop list. I have tried a couple of different ways to make the array ie

 

$ability_array = array('Expert', 'Average', 'Novice');

 

OR

 

$ability_array = array(0 => 'Expert', 1 => 'Average', 2 => 'Novice');

 

OR

 

$ability_array[0] ='Expert';
$ability_array[1]  = 'Average';
$ability_array[2]  = 'Novice';

 

either way I get the same result which is that the drop down list only has the first letter of my array element - 'e','a',' & 'n'.

 

does anyone know why. I know that the function allows strings more than one character ?

 

 

 

the code I am using to call up the function is

 

 

echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_pull_down_menu('surferRecAbility', $ability_array, $pInfo->surferRecAbility);

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...