Forums / General Questions / Problem with forms. What's missing?

Problem with forms. What's missing?

Locked

Started by sjk1000 on 16 Feb 2009, 7:11 PM · Views: 701

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
16 Feb 2009, 7:11 PM
#1
sjk1000 avatar

sjk1000

New Zenner

Join Date:
Sep 2008
Posts:
100
Plugin Contributions:
0

Problem with forms. What's missing?

Hi All
I'm trying to add a couple of extra form fields to the checkout shipping page that should be carried over to the checkout payment page but it's not working. To find the source of the problem I've gone back to basics and inserted

Enter your name: <input type="text" name="name" /> 

to tpl_checkout_shipping_default.php just after the zen_draw_form.

Then I've added

Welcome <?php echo $_POST["name"]; ?>.<br /> 

to tpl_checkout_payment_default.php. This should be straightforward. What am i missing?
Thanks, Steve

16 Feb 2009, 7:56 PM
#2
sjk1000 avatar

sjk1000

New Zenner

Join Date:
Sep 2008
Posts:
100
Plugin Contributions:
0

Re: Problem with forms. What's missing?

Got it. Followed the advice from the forum entry here

http://www.zen-cart.com/forum
/showthread.php?t=115909&highlight=_post

I found the checkout_shipping header file here

catalog/includes/modules/pages/checkout_shipping/header_php.php

and inserted the following which copies the post array to the session before it's cleared.

if (isset($_POST['name'])) {
$_SESSION['name'] = $_POST['name']; }

$_SESSION['name'] is then available to checkout_payment. Drop me a line if anyone needs this clarifying. I'm aware that I should be using an override but not sure how to for headers. Anyone?

Steve