Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2006
    Posts
    12
    Plugin Contributions
    0

    Additional Payment Info

    I'd like to include additional text fields in the "Special Instructions" section of step 2 out of 3 of the checkout process (Payment Method).
    I need to include some organization specific fields - 5 in total.

    What files need to be edited? I tried tracing the flow but can't figure it out on my own.

    Thanks in advance.

  2. #2
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: Additional Payment Info

    Quote Originally Posted by Zzyzx
    I'd like to include additional text fields in the "Special Instructions" section of step 2 out of 3 of the checkout process (Payment Method).
    I need to include some organization specific fields - 5 in total.

    What files need to be edited? I tried tracing the flow but can't figure it out on my own.

    Thanks in advance.
    includes\languages\english\checkout_shipping.php
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  3. #3
    Join Date
    Sep 2006
    Posts
    12
    Plugin Contributions
    0

    Default Re: Additional Payment Info

    Thanks superprg for your quick answer,

    However, this file contains only the language definition. Altought, I need to modify that as well, I'm interested in adding the additional test fields with all the logic behind them: input verification/sanitation, db population.

    Do you know which file contains the code that inserts all the values from the checkout process?

    Thanks!

  4. #4
    Join Date
    Sep 2006
    Posts
    12
    Plugin Contributions
    0

    Default Re: Additional Payment Info

    Attached is a screenshot to visualize what part of the checkout I'm talking about.

    I'd like to have the comments textbox + additional 5 text input fields right below it.
    Attached Images Attached Images  

  5. #5
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: Additional Payment Info

    Quote Originally Posted by Zzyzx
    Thanks superprg for your quick answer,

    However, this file contains only the language definition. Altought, I need to modify that as well, I'm interested in adding the additional test fields with all the logic behind them: input verification/sanitation, db population.

    Do you know which file contains the code that inserts all the values from the checkout process?

    Thanks!
    Template files
    includes\templates\template_default\templates\tpl_checkout_payment_default.php
    includes\templates\template_default\templates\tpl_checkout_shipping_default.php

    Code files
    includes\modules\pages\checkout_shipping

    includes\modules\pages\checkout_payment
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  6. #6
    Join Date
    Sep 2006
    Posts
    12
    Plugin Contributions
    0

    Default Re: Additional Payment Info

    Thanks a bunch!!!

    More questions though...

    The visual part was a piece of cake (check out the attach.) but the logic is not so logical to me...

    Those new 5 text fields pass their values to the script with:
    $charge_to_acct
    $charge_to_org
    $charge_to_fund
    $program
    $project

    Code:
    <fieldset>
    
    <legend><?php echo TABLE_HEADING_COMMENTS; ?></legend>
    
    <?php echo zen_draw_textarea_field('comments', '50', '3');?>
    <?php echo "<br>"; ?>
    <?php echo "<br>"; ?>
    <?php echo "<br>"; ?>
    <?php echo "<br>"; ?>
    <fieldset>
    <legend>REQUIRED</legend>
    <?php echo "<b>Charge to Account:</b>"; ?>
    <?php echo zen_draw_input_field('charge_to_acct') ?>
    <?php echo "<b> &nbsp &nbsp Charge to Fund :</b>"; ?>
    <?php echo zen_draw_input_field('charge_to_fund') ?>
    <?php echo "<b> &nbsp &nbsp Charge to Org :</b>"; ?>
    <?php echo zen_draw_input_field('charge_to_org') ?>
    </fieldset>
    <fieldset>
    <legend>Required only if related to your purchase</legend>
    <?php echo "&nbsp &nbsp &nbsp<b>Program:</b>"; ?>
    <?php echo zen_draw_input_field('program') ?>
    <?php echo "&nbsp &nbsp &nbsp<b>Project:</b>"; ?>
    <?php echo zen_draw_input_field('project') ?>
    </fieldset>
    </fieldset>
    Now those variables get passed to includes/modules/pages/checkout_process/header_php.php is that right?

    If so, I hit a wall, I have no idea where the DB query to insert the new record is.
    Attached Images Attached Images  

  7. #7
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: Additional Payment Info

    Zzyzx,
    May I askif the additional fields are just for the record in the database or you are going to pass it somewhere(like to the payment gateway etc)?
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  8. #8
    Join Date
    Sep 2006
    Posts
    12
    Plugin Contributions
    0

    Default Re: Additional Payment Info

    Quote Originally Posted by superprg
    Zzyzx,
    May I askif the additional fields are just for the record in the database or you are going to pass it somewhere(like to the payment gateway etc)?
    Good question, I should have clarified that earlier. I am going to use it ONLY to update records in the DB. I want those values to appear in the admin section for customers and orders and later on I may create some simple reporting scripts to create reports specific to my requirements such as orders per: account, org, fund etc...

    I understand I could create my own simplified php hack with a separate db query called after submit but why reinvent the wheel. But I just can't find that pesky INSERT statement...maybe because it's Friday and I'm going home in 10 min :)

    Thanks!
    Last edited by Kim; 7 Oct 2006 at 03:08 AM.

  9. #9
    Join Date
    Oct 2006
    Posts
    81
    Plugin Contributions
    0

    Default Re: Additional Payment Info

    Is there actually a way to stop the additional payment info box showing at all?

    regards

    LYn

 

 

Similar Threads

  1. Collecting Additional Info at Payment stage
    By scottmcclean in forum General Questions
    Replies: 5
    Last Post: 22 Jan 2012, 09:49 PM
  2. Additional info in sidebox
    By sandihudson in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 15 Jun 2011, 01:19 AM
  3. Replies: 11
    Last Post: 20 Apr 2009, 10:22 PM

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