Results 1 to 10 of 84

Threaded View

  1. #15
    Join Date
    Nov 2008
    Posts
    18
    Plugin Contributions
    0

    Default Re: Adding Field to Checkout

    Quote Originally Posted by Absolute View Post
    1 - depends on how you handle your own data. You need to ensure that it is handled in the same way as all other data being passed. So if it is added to an array, and tehn passed to a zen_db_perform() function this handles the injection checking. If you are creating the insert, then you need to ensure you use zen_db_prepare_input() or similar, however, this function can only be RUN ONCE one your data, oterhwise you will create more problems than you solve!

    2 - Making fields required is handled by the checkout page header_php.php file. If you are submitted the shipping page, it would be within includes/modules/pages/checkout_shipping/header_php.php. Chek that the data is set correctly, and if not, raise the error. You'll see similar examples within this file.

    Absolute
    Thanks for the prompt reply.

    Im using the exact example given in the 2nd post in this thread, just repeating the process for the amount of feilds I need (changing there names of course)

    so in includes/modules/pages/checkout_shipping/header_php.php

    this line

    PHP Code:
    if (zen_not_null($_POST['frequent_code'])) {
    $_SESSION['frequent_code'] = zen_db_prepare_input($_POST['frequent_code']);
    }
    $frequent_code $_SESSION['frequent_code']; 
    Im assuming takes care of it

    Once again, thanks for the help and prompt reply
    Last edited by eddyboy; 9 Feb 2009 at 05:03 PM. Reason: typos

 

 

Similar Threads

  1. v151 Adding custom field during checkout
    By hues in forum General Questions
    Replies: 1
    Last Post: 9 Nov 2012, 10:39 PM
  2. Adding Field to Checkout
    By earlygrayte in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 17 Feb 2012, 03:00 PM
  3. Adding select field to checkout
    By ETbyrne in forum Managing Customers and Orders
    Replies: 1
    Last Post: 22 Aug 2008, 02:34 AM
  4. adding a field to checkout and db
    By StevenB in forum General Questions
    Replies: 0
    Last Post: 20 May 2007, 12:57 AM

Posting Permissions

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