I have read through this thread, and I think I'v followed the instructions accurately, but the data entered in my new field is not showing up in the DB. Here is the code in excruciating detail (using 1.3.7):
<fieldset class="shipping" id="comments">
<legend><?php echo TABLE_HEADING_COMMENTS; ?></legend>
<?php echo zen_draw_textarea_field('comments', '45', '3'); ?>
</fieldset>
<!-- my mod -->
<fieldset class="shipping">
<legend>Please enter the name of your preferred wholesaler/distributor:</legend>
<?php echo zen_draw_textarea_field('comments'); ?>
</fieldset>
<div class="buttonRow forward">...
Here's the mysql code to add the column:
ALTER TABLE zhanken_orders ADD order_other_dist VARCHAR( 128 ) NOT NULL COMMENT 'my mod' AFTER paypal_ipn_id ;
Edited order.php as indicated (won't post the whole thing), replacing 'order_frequent_code' with 'order_other_dist', and 'frequent_code' with 'other_dist'
and from checkout_shipping/header_php.php
$free_shipping = false;
if ( ($pass == true) && ($_SESSION['cart']->show_total() >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
$free_shipping = true;
if (isset($_SESSION['other_dist'])) {
$other_dist = $_SESSION['other_dist'];
}
}
} else {
$free_shipping = false;
}
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
if (isset($_SESSION['comments'])) {
$comments = $_SESSION['comments'];
if (zen_not_null($_POST['other_dist'])) {
$_SESSION['other_dist'] = zen_db_prepare_input($_POST['other_dist']);
}
$other_dist = $_SESSION['other_dist'];
}
// process the selected shipping method
if ( isset($_POST['action']) && ($_POST['action'] == 'process') ) {
if (zen_not_null($_POST['comments'])) {
$_SESSION['comments'] = zen_db_prepare_input($_POST['comments']);
}
The test sale completes successfully, but the order_other_dist field is empty. Please help the FNG if you can...