Forums / Templates, Stylesheets, Page Layout / Remove Special Instructions

Remove Special Instructions

Locked

Started by solarchart on 22 Oct 2006, 5:36 PM · Views: 7,595

Results 1 to 20 of 22
This thread is locked. New replies are disabled.
22 Oct 2006, 5:36 PM
#1
solarchart avatar

solarchart

New Zenner

Join Date:
Oct 2006
Posts:
10
Plugin Contributions:
0

Remove Special Instructions

Hi,

can anybody tell me how to remove the special instructions when a customer places an order on my site.

Regards,

Ian Murray

22 Oct 2006, 6:51 PM
#2
Kim avatar

Kim

Obaa-san

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

Re: Remove Special Instructions

The textarea in the checkout? You will need to comment out the code.

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.

22 Oct 2006, 9:46 PM
#3
solarchart avatar

solarchart

New Zenner

Join Date:
Oct 2006
Posts:
10
Plugin Contributions:
0

Re: Remove Special Instructions

Thanks Kim for pointing me in the right direction, all solved now

Regards,

Ian Murray

9 Nov 2006, 5:39 PM
#4
lawbird123 avatar

lawbird123

Zen Follower

Join Date:
Sep 2006
Location:
Jacksonville, FL
Posts:
231
Plugin Contributions:
0

Re: Remove Special Instructions

I am trying to do the exact same thing. In what file would I find that particular piece of code to comment out?

John L.
MultiMedia Designer

12 Nov 2006, 4:45 PM
#5
solarchart avatar

solarchart

New Zenner

Join Date:
Oct 2006
Posts:
10
Plugin Contributions:
0

Re: Remove Special Instructions

HI,

what i did was to take a copy of the following files:

tpl_checkout_payment_default.php
tpl_checkout_shipping_default.php

and move them to my custom overrides directory.

the code i changed was as follows:

tpl_checkout_payment_default.php:

Comment out lines 178 - 182

*<fieldset>

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

tpl_checkout_shipping_default.php:

Comment out lines 117 - 120

*<fieldset class="shipping" id="comments">

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

That should do it.

regards,

Ian

Regards,

Ian Murray

13 Nov 2006, 2:20 PM
#6
lawbird123 avatar

lawbird123

Zen Follower

Join Date:
Sep 2006
Location:
Jacksonville, FL
Posts:
231
Plugin Contributions:
0

Re: Remove Special Instructions

excellent... thanks a lot, Ian!

John L.
MultiMedia Designer

13 Feb 2007, 6:10 PM
#7
vik007 avatar

vik007

Zen Follower

Join Date:
Feb 2007
Posts:
201
Plugin Contributions:
0

Re: Remove Special Instructions

Nice job ian:-)

Worked a treat :smartass:

13 Feb 2007, 10:06 PM
#8
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Remove Special Instructions

There's another way of doing this that makes it easier to turn back on should you decide at a later date you need to:

In tpl_checkout_payment_default.php at line 178, make <fieldset> into ```

<fieldset id="comments"> ```

Then in your stylesheet, add ```
#comments {display: none;}


which will hide the section on both pages. If you then decide you need it, you have only one file to edit.

NB whereas both **display: none** and **visibility:hidden**  prevent the element from being shown, the latter still renders it in the browser and leaves space where it would show.
***
Please also note that I have not checked for other instances of "id=comments" in Zen Cart***

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

17 Feb 2007, 2:11 AM
#9
vik007 avatar

vik007

Zen Follower

Join Date:
Feb 2007
Posts:
201
Plugin Contributions:
0

Re: Remove Special Instructions

hi,

  1. I did the first method you suggested..and seemed to work fine..only to find that the special instrutions still appear on the final checkout page? along with the edit button..when you click edit, it goes back to step 2/3, but the special instuctions box is not there (which is fine)

so how do we get rid of the edit button on step 3??

  1. where do i add the second code in the style sheet? where can i find this file? is it my template stylesheet/ if so what line do i put it in?

  2. should i just stick to the first method??

thanxs in advacne

17 Feb 2007, 9:48 AM
#10
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Remove Special Instructions

vik007:

hi,

  1. where do i add the second code in the style sheet? where can i find this file? is it my template stylesheet/ if so what line do i put it in?

includes/templates/YOUR_TEMPLATE/css/stylesheet.css ; as #comments is a new class for you, then you can add the line anywhere you like... personally, I tend to add any little oddities like this at the end of the file (in fact, as a builder of Zencarts, I prefer to keep all my extras in a separate stylesheet for future/repeated use)

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

17 Feb 2007, 1:09 PM
#11
vik007 avatar

vik007

Zen Follower

Join Date:
Feb 2007
Posts:
201
Plugin Contributions:
0

Re: Remove Special Instructions

hi iv added the code #comments {display: none;} in the stylesheet.

but the instructions still appear on the checkout page.?

becuase i am using a blue_sku template..thats the folder i use the stylesheet from isint?

17 Feb 2007, 1:33 PM
#12
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Remove Special Instructions

Check that the checkout page has the id in the fieldset - please post a url if you need more help.

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

17 Feb 2007, 8:19 PM
#13
vik007 avatar

vik007

Zen Follower

Join Date:
Feb 2007
Posts:
201
Plugin Contributions:
0

Re: Remove Special Instructions

Ryk:

Check that the checkout page has the id in the fieldset - please post a url if you need more help.

Iv opened tpl_checkout_payment_default and made a search for fieldset id.
changed it to:

<fieldset id="comments">

but still no luck:cry: line 178 does not contain the word fieldset (am guessing i must have messed it up) :blush:

www.unikids.co.uk/zencart

thanxs mate

17 Feb 2007, 9:05 PM
#14
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Remove Special Instructions

OK - you need to now find the section in tpl_checkout_confirmation.php which displays the Special Instructions stuff and give that an id=Comments as well.

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

17 Feb 2007, 11:51 PM
#16
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Remove Special Instructions

Still in the same file, find ```

<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" /> ```

and comment out both the html and php code.

Then for tidiness, comment out the <hr /> which comes just after it.

Do keep a backup copy of the file. Save this to your overrides directory.

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

18 Feb 2007, 1:06 AM
#17
vik007 avatar

vik007

Zen Follower

Join Date:
Feb 2007
Posts:
201
Plugin Contributions:
0

Re: Remove Special Instructions

worked a treat mate:-) your a star.

  1. just lastly on the step 2 page (http://unikids.splay.co.uk/zencart/index.php?main_page=checkout_payment)

How do i get the 'please note...etc' text a left alignment. it seems to be stuck on the right hand side? lol

  1. what is the coding to get rid of the payment method text / contact seller text?
18 Feb 2007, 10:18 AM
#18
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Remove Special Instructions

Time to invoke the mantra of "Give a man a fish, feed him for a day; teach a man to fish, feed him for life"...

  1. Get better tools!
  • Download and install Firefox (it's better than IE - even IE7 anyway!).
  • Install the Web Developer Toolkit add on.
  • Use the css tools to identify the element you need to change the css of
  • Use the Edit CSS to test and change the css on the fly. When happy, save the stylesheet and then upload to your site.
  1. Reverse engineer!

The vast majority of the text is contained in define statements in the language files. Go to the page you want to make the change on. Note the part of the url in your browser address bar that comes after "main_page=" - in this case "checkout_payment"

Start by putting "Payment Method" into admin >tools > developers tool kit in the bottom box and search all catalog/admin files.

Scroll down the results list until you find the correct define (in some instances there will be more than one, so you need to be careful - you are looking for a language file and your clue is the "checkout_payment"). In this case, the one you want is in /includes/languages/english/checkout_payment.php, or, assuming you've been using the override structure correctly, in /includes/languages/english/YOUR_TEMPLATE/checkout_payment.php and reads ```
Line #18 : define('TABLE_HEADING_PAYMENT_METHOD', 'Payment Method');


Now you know that the constant used to display this message is called **TABLE_HEADING_PAYMENT_METHOD**

Paste **TABLE_HEADING_PAYMENT_METHOD** into admin > tools > developers tool kit in the bottom box and search all catalog/admin files.

You will see several returns, including the language file you just got the information from, but this time you are looking for something OTHER than a define statement. Again, you are only interested in filenames that include "checkout_payment" and you can see that TABLE_HEADING_PAYMENT_METHOD appears in **includes/templates/template_default/templates/tpl_checkout_payment_default.php** where you can see that it is used at line #90. Again, if you've been using the override system correctly you will also see it at **includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_payment_default.php** 

Examine **includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_payment_default.php** in your text editor and work out which of the surrounding code is generating the section you don't want, and either comment it out, or hide it using css, whichever you feel is best.

You can use this system for almost anything, and as you become more familiar with where things are likely to be, you can speed up your searching by using the other options rather than just All Files Catalog/Admin.

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

23 Apr 2007, 2:57 AM
#19
skilaq avatar

skilaq

New Zenner

Join Date:
Mar 2007
Posts:
46
Plugin Contributions:
0

Re: Remove Special Instructions

where would i have to go to simply add some text to the payment method box, i just wanna add "Please note: blah blah blah" where could i do that,

any help would be great. :-)

23 Apr 2007, 3:55 AM
#20
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Remove Special Instructions

Did you read Ryk's detailed post explaining how to figure this out?

Find a bit of text near the spot you want to add to, and search for its define statement. Maybe you can just add to this, or maybe you will have to do the "reverse engineering" bit. Actually, for your case, Ryk gave the filename and possibly line number already.