Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How To Remove Customer Comments Field On Order Page?

How To Remove Customer Comments Field On Order Page?

Locked

Views: 2,554

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
13 Nov 2009, 1:27 PM
#1
merrydown avatar

merrydown

New Zenner

Join Date:
Jan 2009
Posts:
51
Plugin Contributions:
0

How To Remove Customer Comments Field On Order Page?

I have tried to search for an answer to this without success. I vaguely remember it being mentioned somewhere, so sorry if it is a 101 fail.

What is the simplest way to turn off 'customer comments'? My client is receiving requests in the comments field which they cannot fulfill and they have asked me to remove it from the ordering process.

Any thanks would be most gratefully received.

Jim:frusty:

14 Nov 2009, 11:34 PM
#3
merrydown avatar

merrydown

New Zenner

Join Date:
Jan 2009
Posts:
51
Plugin Contributions:
0

Re: How To Remove Customer Comments Field On Order Page?

You're a star, thanks for responding :)

14 Nov 2009, 11:36 PM
#4
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,176
Plugin Contributions:
0

Re: How To Remove Customer Comments Field On Order Page?

Me,
Your Welcome, glad the could help you find the right thread...

15 Nov 2009, 1:02 AM
#5
merrydown avatar

merrydown

New Zenner

Join Date:
Jan 2009
Posts:
51
Plugin Contributions:
0

Re: How To Remove Customer Comments Field On Order Page?

I made some changes and now the comments field is hidden on ordering pages. I also made a change so there is no option to go back and edit comments. (In the text below I use the word remmed in place of 'commented' for obvious reasons.)

  1. I copied the following files

tpl_checkout_shipping_default.php
tpl_checkout_payment_default.php
tpl_checkout_confirmation_default.php

from /includes/templates/template_default/templates/
to /includes/templates/my_custom_template/templates/
(where 'my_custom_template' is the name of my template overide)

  1. I then remmed out some lines and put a dummy hidden field in (to allow a null value to be passed instead of no value for the comment field which I had remmed) as follows:

tpl_checkout_shipping_default.php

<fieldset class="shipping" id="comments"> <legend><?php echo TABLE_HEADING_COMMENTS; ?></legend> <?php echo zen_draw_textarea_field('comments', '45', '3'); ?> </fieldset>

Became:

<!--<fieldset class="shipping" id="comments"> <legend><?php echo TABLE_HEADING_COMMENTS; ?></legend> <?php echo zen_draw_textarea_field('comments', '45', '3'); ?> </fieldset>--><input type="hidden" name="comments" value="" />

tpl_checkout_payment_default.php

<fieldset id="comments"> <legend><?php echo TABLE_HEADING_COMMENTS; ?></legend> <?php echo zen_draw_textarea_field('comments', '45', '3'); ?> </fieldset>

Became:

<!--<fieldset id="comments"> <legend><?php echo TABLE_HEADING_COMMENTS; ?></legend> <?php echo zen_draw_textarea_field('comments', '45', '3'); ?> </fieldset>--><input type="hidden" name="comments" value="" />

tpl_checkout_confirmation_default.php

<h2 id="checkoutConfirmDefaultHeadingComments"><?php echo HEADING_ORDER_COMMENTS; ?></h2> <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> <br class="clearBoth" /> <?php // } ?> <hr />

Became:

<!-- <h2 id="checkoutConfirmDefaultHeadingComments"><?php echo HEADING_ORDER_COMMENTS; ?></h2> <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> <br class="clearBoth" /> <?php // } ?> <hr /> -->

I hope that helps someone looking for the same solution that I was!

:clap:

15 Nov 2009, 1:50 AM
#6
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,176
Plugin Contributions:
0

Re: How To Remove Customer Comments Field On Order Page?

Me,
Thanks for the complete fix on the .php coding.. Will be very helpful for other Zennners who are looking for this solution..

Thanks again....

15 Nov 2009, 2:39 AM
#7
merrydown avatar

merrydown

New Zenner

Join Date:
Jan 2009
Posts:
51
Plugin Contributions:
0

Re: How To Remove Customer Comments Field On Order Page?

Don't mean to sound cheesey, but I am just glad to give something back. Folks here have helped me a lot!