AJRYAN Posted May 3, 2008 Share Posted May 3, 2008 Can anyone tell me if there is a parameter in tep_draw_input_field to signify the default value (in this case it would be the qty), and or help me with the solution?. Here is the code that's relevant: $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="2"') . tep_draw_hidden_field('products_id[]', $products[$i]['id'])); Unfortunately there is no documentation and I've been unable to find an answer. If anyone can help I'd really appreciate it! Thanks Link to comment Share on other sites More sharing options...
usernamenone Posted May 4, 2008 Share Posted May 4, 2008 <?=$cart->count_contents()?> Link to comment Share on other sites More sharing options...
AJRYAN Posted May 4, 2008 Author Share Posted May 4, 2008 After doing some digging I ran across this: http://www.oscommerce.com/forums/index.php?sho...l=cart+quantity Basically, the solution was to roll back to the pre-patch code in html_output. Only problem is that I suspect this could be a security issue??? The code I HAD that failed is this: //// // Output a form input field function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) { $field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"'; /* PRE-PATCH CODE ###############################3 if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) { $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"'; } elseif (tep_not_null($value)) { $field .= ' value="' . tep_output_string($value) . '"'; } END PRE PATCH CODE ################################# */ if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) { $field .= tep_output_string_protected(stripslashes($GLOBALS[$name])); } elseif (tep_not_null($text)) { $field .= tep_output_string_protected($text); } if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; return $field; } Changing out those lines back to to the pre-patch code did the trick. Does anyone know of a proper solution? Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.