
Originally Posted by
lat9
@balihr, you've done all the right things from an OPC perspective (although I don't believe that you need that alteration to the OPC observer).
This seems to be required. If I remove the modification from the observer, I keep getting "Your order's details have changed. Please review the current values and re-submit." even when I change nothing. So, I log in, go to checkout, keep the cheapest pre-selected shipping option and only click PayPal and then the submit button, and I get that error message. The only thing that prevents that error message from showing up is the unset in the hashSession function.

Originally Posted by
lat9
What additional processing is being performed if a PO number is supplied for the order?
po_number is an additional field in the orders table.
includes/classes/order.php
under function query($order_id)
Code:
$this->info = array(...
'ip_address' => $order->fields['ip_address'],
'po_number' => $order->fields['po_number']
);
under function cart()
Code:
$this->info = array(...
'comments' => (isset($_SESSION['comments']) ? $_SESSION['comments'] : ''),
'po_number' => (isset($_SESSION['po_number']) ? $_SESSION['po_number'] : ''),
'ip_address' => $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR']
);
There's also a one-liner in the email section so it adds the po_number to the order confirmation email (irrelevant).

Originally Posted by
lat9
Another thought, when you indicate that the order has no shipping address, is that based on the order's view in either the customer's account-history-info and/or the admin's order-details display ... or is there no information recorded in the database?
Actually, all 3 is correct, but primarily because of the last one you mentioned - no information in database. The delivery_XXXXX fields in the orders table are all empty, and what I also find very interesting is that delivery_address_format_id is set to 0 (expected value is 2 for US orders).
Also interesting - it only happens with PayPal Express. At first, I thought it was related to the Express shortcut button, but we eliminated that option when we disabled the shortcut button and the issue was still happening. So, the customer does enter OPC and uses PayPal Express when this happens. PayPal Pro doesn't seem to be affected. Also, it's only Guest Checkout when it happens, haven't seen it happen with a regular account checkout.
One thing I should point out - possibly very important - the po_number field doesn't even show up for these customers. You probably noticed the if($check_flag_group) - there's an additional query to check if the customer belongs to a group, and if true, the po_number field will be displayed. Otherwise, that field doesn't show and isn't part of the form at all.