security_man Posted February 12, 2007 Share Posted February 12, 2007 i have a trophy company who wants to use the comments field for the text to be ingraved onto the ordered trophys. They charge by character and just need to know how many characters are in the field when the form is submitted. I found the javascript which will do the counting and it is working fine, but i cant get the form to pass the information onto the next page (ie from checkout_shpping to checkout_payments). I went through payment_process.php and made duplicates of all the comments instructions for the new field but still no luck. The code i have changed to do this is below: on checkout_shipping: <?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?> <input type="button" value="Calculate Characters" onSubmit="countit(this)" onClick="countit(this)"> <?php echo tep_draw_input_field('displaycount'); ?> ----------------------------------- if (tep_not_null($HTTP_POST_VARS['comments'])) { $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']); $displaycount = tep_db_prepare_input($HTTP_POST_VARS['displaycount']); } the code i have changed in checkout_process: 'comments' => $order->info['comments']); 'displaycount' => $order->info['displaycount']); ----------------------- if ($order->info['comments']) { $email_order .= tep_db_output($order->info['comments']) . "\n\n"; $email_order .= tep_db_output($order->info['displaycount']) . "\n\n"; } the code i have changed in checkout_payment (so it displays the number counted): <?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?> <?php echo tep_draw_input_field('displaycount'); ?> and have added the displaycount field to the orders_status_history table in mysql. Any help would be greatly appriciated :) Link to comment Share on other sites More sharing options...
security_man Posted February 13, 2007 Author Share Posted February 13, 2007 anybody have any ideas on this? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.