Is it possible to omit the display of the comment box when customers do not enter a comment/instructions on page 2 of chechout?
Is it possible to omit the display of the comment box when customers do not enter a comment/instructions on page 2 of chechout?
You could customize your template for that, but note that there is an EDIT button to remind the customer that there is a place for comments should they wish to add some ...
This section of code has the comment display and HR tag:
You can copy the tpl_checkout_confirmation_default.php file to your templates and overrides to make this change ...Code:<?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="' . 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 />
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Or, if you didn't want to modify any PHP files, you could take a stab at hiding it via css:
#checkoutPayment form fieldset+fieldset+fieldset+fieldset {
display: none;
}
I haven't actually tested this out, but I'm pretty sure it says "within the div named checkoutPayment, within its form(s), don't display the 4th consecutive fieldset".
it is currently showing "NONE" with the edit box
was hoping to have the whole mod hidden when there is none to clean the page to have the least distraction giving less time to change their mind
The commented IF, when the comment marks // are removed, will hide that when empty ...
You will need a similar IF around that:
<hr />
so you don't get the double line ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
I uncommented the IF but got a blank page being a novice perhaps I did it wrong....
PHP Code:
<?php
}
?>
<br class="clearBoth" />
<hr />
<?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="' . 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 />
Last edited by Lackew; 6 Nov 2009 at 08:12 PM.
blessed be the day we make tomorrow a better yesterday
You need to uncomment the closing bracket of the 'if' too:
So, take out the slashes here as well.Code:<?php // } ?>
Nick
iszent.com
Thanks niccol ... I was not specific enough to say that "uncomment the IF" meant both the starting and ending of the IF statement ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
TERRIFIC!!!!!!!!!!!!!!!!!!!!!!! group-> with Ajeh & Niccol
blessed be the day we make tomorrow a better yesterday
Linda
I was under no illusion that you meant anything else. Seeing 'Ajeh' by a post hugely increases the likelyhood that I will read it and in doing so have learnt so much! So thanks for that.
Nick
iszent.com
Bookmarks