Guest Posted October 31, 2006 Share Posted October 31, 2006 Hi everyone, I have this irritating bug in my shopping cart. When I adjust the number articles to be ordered to 11111111111111111111111111 it become's very cheap shopping. Does anyone have a solution for this? I tried searching the forum but with no result. Using MS2.2 by the way.. Link to comment Share on other sites More sharing options...
Guest Posted October 31, 2006 Share Posted October 31, 2006 You can always limit the number of spaces in the box so people can't order that many. It should be some code similar to; <td class="main"><?php echo TEXT_QUANTITY . ' ' . tep_draw_input_field('quantity', '1', 'size="2" maxlength="2"') . tep_draw_separator('pixel_trans.gif', '5', '1'); ?></td> Link to comment Share on other sites More sharing options...
Guest Posted October 31, 2006 Share Posted October 31, 2006 You can always limit the number of spaces in the box so people can't order that many. It should be some code similar to; <td class="main"><?php echo TEXT_QUANTITY . ' ' . tep_draw_input_field('quantity', '1', 'size="2" maxlength="2"') . tep_draw_separator('pixel_trans.gif', '5', '1'); ?></td> I Think i found an easy solution: Edit your shopping_cart.php in the root of catalog. Find this code: $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data" style="border-bottom:1px solid #C2C2C2;"', 'text' => $products_name); $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top" style="border-bottom:1px solid #C2C2C2;"', 'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="6" maxlength="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id'])); $info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="productListing-data" valign="top" style="border-bottom:1px solid #C2C2C2;"', 'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>'); } I addes maxlength (see the bold code above).. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.