I've given up trying to impress people with my coding skills. My goal now is just not to reveal myself as a dumbs#*&. That goal might be falling to the wayside soon enough. I really thought I was an intelligent person before I tried to learn about programming. But, I digress...
It seems to work opposite of the way I expect it should. I'm obviously missing something fundamental. In the tpl_payment and tpl_shipping template files, there's the same zen_draw_text_field. No difference.
In the shipping header, we have:
Code:
if (isset($_SESSION['comments'])) {
$comments = $_SESSION['comments'];
}
// 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']);
}
$comments = $_SESSION['comments'];
In the payment header, there's just:
Code:
$comments = $_SESSION['comments'];
And in the confirmation header, it's:
Code:
if (isset($_POST['payment'])) $_SESSION['payment'] = $_POST['payment'];
$_SESSION['comments'] = zen_db_prepare_input($_POST['comments']);
So $comments is being set on the delivery page, but because there's no text field to continue the chain, it's getting a NULL value on the payment page. So, I thought if $comments wasn't getting redefined on the payment page, it would remain defined to the value from the delivery page. I removed the bit from the header. That didn't work.
I tried $comments = $order->info['comments'] in the payment header, that didn't work.
So, I've been trying to find the right syntax to assign the value in the payment header to whatever was written on the delivery page. I tried a whole bunch of junk, but got nowhere. Can you verify that I'm somewhat moving in the right direction?