If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Can I omit the Comments area on Page 3 of 3 Checkout?

Can I omit the Comments area on Page 3 of 3 Checkout?

Locked

Started by lackew on 4 Nov 2009, 2:28 PM · Views: 1,279

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
4 Nov 2009, 2:28 PM
#1
lackew avatar

lackew

Zen Follower

Join Date:
Aug 2009
Location:
Tampa Bay
Posts:
223
Plugin Contributions:
1

Post #1 by lackew

Is it possible to omit the display of the comment box when customers do not enter a comment/instructions on page 2 of chechout?

blessed be the day we make tomorrow a better yesterday

4 Nov 2009, 4:11 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #2 by ajeh

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:

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

You can copy the tpl_checkout_confirmation_default.php file to your templates and overrides to make this change ...

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!]
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!

4 Nov 2009, 5:21 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,152
Plugin Contributions:
56

Post #3 by lat9

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

5 Nov 2009, 5:35 PM
#4
lackew avatar

lackew

Zen Follower

Join Date:
Aug 2009
Location:
Tampa Bay
Posts:
223
Plugin Contributions:
1

Post #4 by lackew

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

blessed be the day we make tomorrow a better yesterday

5 Nov 2009, 6:55 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #5 by ajeh

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!]
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!

6 Nov 2009, 7:05 PM
#6
lackew avatar

lackew

Zen Follower

Join Date:
Aug 2009
Location:
Tampa Bay
Posts:
223
Plugin Contributions:
1

Post #6 by lackew

Ajeh:

The commented IF, when the comment marks // are removed, will hide that when empty ...

I uncommented the IF but got a blank page :frusty: being a novice perhaps I did it wrong....

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

blessed be the day we make tomorrow a better yesterday

6 Nov 2009, 9:43 PM
#7
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Post #7 by niccol

You need to uncomment the closing bracket of the 'if' too:

<?php
//  }
?>

So, take out the slashes here as well.

Nick
iszent.com

6 Nov 2009, 11:11 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #8 by ajeh

Thanks niccol ... I was not specific enough to say that "uncomment the IF" meant both the starting and ending of the IF statement ... :cool:

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!]
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!

7 Nov 2009, 5:02 PM
#9
lackew avatar

lackew

Zen Follower

Join Date:
Aug 2009
Location:
Tampa Bay
Posts:
223
Plugin Contributions:
1

Post #9 by lackew

TERRIFIC!!!!!!!!!!!!!!!!!!!!!!! group->:hug: with Ajeh & Niccol

blessed be the day we make tomorrow a better yesterday

7 Nov 2009, 5:05 PM
#10
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Post #10 by niccol

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

Nick
iszent.com

7 Nov 2009, 5:49 PM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #11 by ajeh

You are most welcome ... :smile;

And while it is hard for even me to believe ... sometimes I make mistakes ... :eek:

But usually ... I will find out I was mistaken ... and was absolutely correct after all ... :lamo:

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!]
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!