Site maintenance: Sun 15 Nov, from 20:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / General Questions / 'comments' not being passed to next page during checkout

'comments' not being passed to next page during checkout

Locked

Started by warstormer on 2 Oct 2007, 4:11 PM · Views: 1,855

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
2 Oct 2007, 4:11 PM
#1
warstormer avatar

warstormer

Zen Follower

Join Date:
Aug 2007
Posts:
120
Plugin Contributions:
0

'comments' not being passed to next page during checkout

Hi, the 'Comments' (from Step 1 of 3) are not being passed through the checkout process. The code when you land on the confirmation page (Step 3 of 3) is:

<?php // always show comments // if ($order->info['comments']) { ?> <h2 id="checkoutConfirmDefaultHeadingComments"><?php echo HEADING_ORDER_COMMENTS; ?></h2> <div class="buttonRow forward"><?php echo '<a href="' . $editShippingButtonLink . '">' . 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> <br class="clearBoth" /> <?php // } ?>

Is there something I need to do to switch it on?...

2 Oct 2007, 4:37 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,739
Plugin Contributions:
0

Re: 'comments' not being passed to next page during checkout

The URL?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

3 Oct 2007, 10:30 AM
#4
warstormer avatar

warstormer

Zen Follower

Join Date:
Aug 2007
Posts:
120
Plugin Contributions:
0

Re: 'comments' not being passed to next page during checkout

What I'm not understanding is how the comments are supposed to be passed forward; are they stored in the database from tpl_checkout_shipping_default.php and then accessed by tpl_checkout_confirmation_default.php? (Can a table be checked to see whether the comments have been stored?). Or is the info passed in a query string? Either way, the comments text is not being passed/stored... :huh:

3 Oct 2007, 12:42 PM
#5
warstormer avatar

warstormer

Zen Follower

Join Date:
Aug 2007
Posts:
120
Plugin Contributions:
0

Re: 'comments' not being passed to next page during checkout

One other thing, I recently installed Super Orders, would that have messed up anything?....

3 Oct 2007, 1:42 PM
#6
warstormer avatar

warstormer

Zen Follower

Join Date:
Aug 2007
Posts:
120
Plugin Contributions:
0

Re: 'comments' not being passed to next page during checkout

warstormer:

What I'm not understanding is how the comments are supposed to be passed forward; are they stored in the database from tpl_checkout_shipping_default.php and then accessed by tpl_checkout_confirmation_default.php? (Can a table be checked to see whether the comments have been stored?). Or is the info passed in a query string? Either way, the comments text is not being passed/stored... :huh:

Not much is making sense on this page, (then again I'm used to ASP..) The form on tpl_checkout_shipping_default.php has an action of: action="https://www.undergroundtoys.co.uk/fgstore/index.php?main_page=checkout_shipping", so it's looping back on itself, but I can't see what the page (or elements of the structure) is supposed to do with the data in this form. Any insight would be greatly appreciated..

3 Oct 2007, 6:46 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: 'comments' not being passed to next page during checkout

Why did you remove the comments field from the checkout_payment page ?
Removing it there effectively sets the comments to blank when moving through the payment page to confirmation.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

3 Oct 2007, 8:06 PM
#8
warstormer avatar

warstormer

Zen Follower

Join Date:
Aug 2007
Posts:
120
Plugin Contributions:
0

Re: 'comments' not being passed to next page during checkout

DrByte:

Why did you remove the comments field from the checkout_payment page ?
Removing it there effectively sets the comments to blank when moving through the payment page to confirmation.

Hi DrByte, thanks for the reply... if the comments field is gone then that's an unintentional hiccup... :blush: I'm going to check what's happened to that page (I'm admittedly not the only one working on this..)

3 Oct 2007, 8:16 PM
#9
warstormer avatar

warstormer

Zen Follower

Join Date:
Aug 2007
Posts:
120
Plugin Contributions:
0

Re: 'comments' not being passed to next page during checkout

DrByte:

Why did you remove the comments field from the checkout_payment page ?
Removing it there effectively sets the comments to blank when moving through the payment page to confirmation.

warstormer:

Hi DrByte, thanks for the reply... if the comments field is gone then that's an unintentional hiccup... :blush: I'm going to check what's happened to that page (I'm admittedly not the only one working on this..)

That was of course the problem, thanks again for pointing out the obvious! .... Now, can I have 'comments' on the checkout_payment page as a hidden field?

3 Oct 2007, 9:02 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: 'comments' not being passed to next page during checkout

It would be easiest to hide it using the stylesheet rather than rewriting the PHP code.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Oct 2007, 10:52 AM
#11
warstormer avatar

warstormer

Zen Follower

Join Date:
Aug 2007
Posts:
120
Plugin Contributions:
0

Re: 'comments' not being passed to next page during checkout

Yep, see what you mean... Thanks for the suggestion. :smile: