Zen Cart Logo
Forums / General Questions / Appending Comments at Checkout

Appending Comments at Checkout

Locked

Views: 815

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
6 May 2010, 10:08 PM
#1
akabin avatar

akabin

New Zenner

Join Date:
Feb 2010
Posts:
24
Plugin Contributions:
0

Appending Comments at Checkout

I tried this question in the "Templates, Stylesheets, Page Layout" section, but didn't get a response. Here's hoping someone here might point me in the right direction...

We give a percentage of our profits to 1 of 4 charities for every sale. People have the option to choose the charity that they would like their percentage directed. In "Step 3 of 3" of the checkout, I've set up a radio button so they can select the organization they want their portion to go to. I want to do is tack the information to the "Order Comments" variable that's passed to the database. Can anyone help append the customer's comment to add my own comment at the end on checkout? I've looked at the php, but I have no clue as to what's going on. I believe this is what needs to be edited:

<div class="buttonRow forward"><?php echo  '<a href="' . zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_EDIT_SMALL, BUTTON_EDIT_SMALL_ALT) . '</a>'; ?></div>
<div><?php echo (empty($order->info['comments']) ? NO_COMMENTS_TEXT : nl2br(zen_output_string_protected($order->info['comments'])) . zen_draw_hidden_field('comments', $order->info['comments'])); ?></div>

Any assistance would be greatly appreciated. Thanks in advance!

6 May 2010, 10:15 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Appending Comments at Checkout

I've set up a radio button so they can select the organization they want their portion to go to.
Have you added a DB record to contain this information?

6 May 2010, 11:31 PM
#3
akabin avatar

akabin

New Zenner

Join Date:
Feb 2010
Posts:
24
Plugin Contributions:
0

Re: Appending Comments at Checkout

kobra:

Have you added a DB record to contain this information?

No, I didn't. I was hoping to just append the comments with a quick "Organization = (their selection)" at the end so I didn't have to add an extra DB record. I figured that would be easier.

7 May 2010, 10:08 PM
#4
akabin avatar

akabin

New Zenner

Join Date:
Feb 2010
Posts:
24
Plugin Contributions:
0

Re: Appending Comments at Checkout

Would there be a better way to do it?

10 May 2010, 10:06 PM
#5
akabin avatar

akabin

New Zenner

Join Date:
Feb 2010
Posts:
24
Plugin Contributions:
0

Re: Appending Comments at Checkout

Just bumping this up. I've been trying to figure this out for quite a while now and it's pretty much the last thing before I can launch the site, so I'm kinda stuck. Any php gurus who could point me in the right direction? It would be greatly appreciated!