Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Additional Payment Info

Additional Payment Info

Locked

Views: 1,934

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
6 Oct 2006, 7:28 PM
#1
zzyzx avatar

zzyzx

New Zenner

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.

6 Oct 2006, 7:39 PM
#2
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: Additional Payment Info

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

6 Oct 2006, 7:45 PM
#3
zzyzx avatar

zzyzx

New Zenner

Join Date:
Sep 2006
Posts:
12
Plugin Contributions:
0

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!

6 Oct 2006, 7:53 PM
#4
zzyzx avatar

zzyzx

New Zenner

Join Date:
Sep 2006
Posts:
12
Plugin Contributions:
0

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.

6 Oct 2006, 7:55 PM
#5
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: Additional Payment Info

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

6 Oct 2006, 9:02 PM
#6
zzyzx avatar

zzyzx

New Zenner

Join Date:
Sep 2006
Posts:
12
Plugin Contributions:
0

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

<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.

6 Oct 2006, 9:44 PM
#7
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

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)?

6 Oct 2006, 9:52 PM
#8
zzyzx avatar

zzyzx

New Zenner

Join Date:
Sep 2006
Posts:
12
Plugin Contributions:
0

Re: Additional Payment Info

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!

28 Feb 2008, 10:32 PM
#9
hedgepig avatar

hedgepig

New Zenner

Join Date:
Oct 2006
Posts:
80
Plugin Contributions:
0

Re: Additional Payment Info

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

regards

LYn