Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

lenght of product attributes in product_info.php


jorn

Recommended Posts

i nead help to change in this code for (Output a form pull down menu)

i will like to have the same lenght of thr pull down menu. so if sombody gan help with this i will be very happy.

 

here is the code to be changed

 

---------------------------------------

// Output a form pull down menu 1

function tep_draw_pull_down_menu_1($name, $values, $default = '', $parameters = '', $required = false) {

$field = '<select name="' . tep_output_string($name) . '"';

 

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

 

$field .= '>';

 

if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);

 

for ($i=0, $n=sizeof($values); $i<$n; $i++) {

$field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';

if ($default == $values[$i]['id']) {

$field .= ' SELECTED';

}

 

$field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';

}

$field .= '</select>';

 

if ($required == true) $field .= TEXT_FIELD_REQUIRED;

 

return $field;

}

 

////

Jorn

Link to comment
Share on other sites

i nead help to change in this code for (Output a form pull down menu)

i will like to have the same lenght of thr pull down menu. so if sombody gan help with this i will be very happy.

 

here is the code to be changed

 

---------------------------------------

// Output a form pull down menu 1

  function tep_draw_pull_down_menu_1($name, $values, $default = '', $parameters = '', $required = false) {

    $field = '<select name="' . tep_output_string($name) . '"';

 

    if (tep_not_null($parameters)) $field .= ' ' . $parameters;

 

    $field .= '>';

 

    if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);

 

    for ($i=0, $n=sizeof($values); $i<$n; $i++) {

      $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';

      if ($default == $values[$i]['id']) {

        $field .= ' SELECTED';

      }

 

      $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';

    }

    $field .= '</select>';

 

    if ($required == true) $field .= TEXT_FIELD_REQUIRED;

 

    return $field;

  }

 

////

 

have enybody solvet this matter for the lenght of pulldown menus in product_info

 

this line

 

echo tep_draw_pull_down_menu('id[' . $products_options_name_values['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name_values['products_options_id']]);

Jorn

Link to comment
Share on other sites

have enybody solvet this matter for the lenght of pulldown menus in product_info

 

this line

 

echo tep_draw_pull_down_menu('id[' . $products_options_name_values['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name_values['products_options_id']]);

 

 

come one

Jorn

Link to comment
Share on other sites

 

Here is the sulution for the lenght of product Attributes in product_info

---------------------------------------------------------------------------------

 

// Output a form pull down menu 1

function tep_draw_pull_down_menu_1($name, $values, $default = '', $parameters = '', $required = false) {

$field = '<select style="width=430;" name="' . tep_output_string($name) . '"';

 

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

 

$field .= '>';

 

if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);

 

for ($i=0, $n=sizeof($values); $i<$n; $i++) {

$field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';

if ($default == $values[$i]['id']) {

$field .= ' SELECTED';

}

 

$field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';

}

$field .= '</select>';

 

if ($required == true) $field .= TEXT_FIELD_REQUIRED;

 

return $field;

}

 

////

 

--------------------------------------------

This line

 

$field = '<select style="width=430;" name="' . tep_output_string($name) . '"';

 

 

My Webpage

Jorn

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...