Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004
    Posts
    11
    Plugin Contributions
    0

    Default $_POST vatiables

    I am trying to add an additional field to my checkout_shipping, Not a problem it is added to the tpl_checkout_shipping_default.php and it appears on my form.
    Now when I submit the page to go to ?main_page=checkout_payment I tried to read the $_POST['fieldname'] and nothing there.

    I put this in the top of the template page and nothing for either the POST or GET.

    print(’<pre>’);
    print_r($_POST);
    print(’</pre>’);

    Can someone tell me how to pass from one page to another then to finally store into the DB?

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,655
    Plugin Contributions
    25

    Default Re: $_POST vatiables

    This is most likely because checkout_shipping doesn't go directly to checkout_payment.

    Instead it calls itself, checks that it has everything it needs and if not redisplays the checkout_shipping form.

    Only if it's good to go forward will it redirect to checkout_payment page, wiping $_POST along the way.

    So to preserve your new data, you would need to detect it in the header_php file for checkout_shipping and store it in a $_SESSION variable.
    See and test drive Zen Cart's free templates at zencarttemplates.info

    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 

Similar Threads

  1. Attributes $_POST or $_SESSION ????!!!
    By accurax in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 4 Oct 2008, 02:07 PM
  2. How come I can't modify $_POST variables in an observer
    By audleman in forum General Questions
    Replies: 6
    Last Post: 8 Apr 2008, 07:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •