Followup to my previous post here...
Report All Errors revealed nothing, there was no mention of checkout pages at all. OPC debug logs show nothing relevant, everything looks just the same as all other orders.
I now think this is related to the modifications I had added to the checkout process. I tried removing it and everything worked fine for a week. Then I restored the modifications and problems are back.
Several orders have gone through without any Shipping Address.
Did I make any mistakes with the custom-added session variable? Here's what I've done:
tpl_modules_opc_payment_choices.php - line 23 (right after <legend>):
Code:
$po_val = isset($_SESSION['po_number']) ? $_SESSION['po_number'] : '';
if($check_flag_group) {
?>
<!--bof comments block -->
<div id="checkoutPurchaseOrder">
<fieldset class="shipping" id="purchaseOrder"><legend><?php echo MODULE_PAYMENT_PURCHASEORDER_TEXT_PURCHASEORDER_NUMBER; ?></legend><?php echo zen_draw_input_field('po_number', $po_val, 'id="purchaseorders-po-number"' . $onFocus . ' autocomplete="off"'); ?></fieldset>
</div>
<!--eof comments block -->
<?php } ?>
then, includes/modules/pages/checkout_one_confirmation/header.php - line 167 (right after $comments = $_SESSION['comments'];)
Code:
unset($_SESSION['po_number']);
if(zen_not_null($_POST['po_number'])) {
$_SESSION['po_number'] = zen_clean_html($_POST['po_number']);
$po_number = $_SESSION['po_number'];
}
and finally includes/classes/observers/class.checkout_one_observer.php on line 573 (right after unset for ceon manual card):
Code:
if (isset($session_data['po_number'])) {
unset($session_data['po_number']);
}
What am I missing? If I remove this code, everything works just fine. If this code is there, SOME orders come through without Shipping Address (database fields are left empty).

Thanks!
Bookmarks