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
New Zenner
Hi,
can anybody tell me how to remove the special instructions when a customer places an order on my site.
Regards,
Ian Murray
Obaa-san
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.
New Zenner
Thanks Kim for pointing me in the right direction, all solved now
Regards,
Ian Murray
Zen Follower
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
New Zenner
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
Zen Follower
excellent... thanks a lot, Ian!
John L.
MultiMedia Designer
Zen Follower
Nice job ian:-)
Worked a treat :smartass:
Totally Zenned
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 !
Zen Follower
hi,
so how do we get rid of the edit button on step 3??
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?
should i just stick to the first method??
thanxs in advacne
Totally Zenned
vik007:
hi,
- 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 !
Zen Follower
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?
Totally Zenned
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 !
Zen Follower
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:
but still no luck:cry: line 178 does not contain the word fieldset (am guessing i must have messed it up) :blush:
thanxs mate
Totally Zenned
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 !
Zen Follower
ok iv done something..which is great..
But how can i get rid of the edit buttons? and replace with text line instead.
http://unikids.splay.co.uk/zencart/index.php?main_page=checkout_confirmation
log in email: [email protected]
password: test123
Totally Zenned
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 !
Zen Follower
worked a treat mate:-) your a star.
How do i get the 'please note...etc' text a left alignment. it seems to be stuck on the right hand side? lol
Totally Zenned
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"...
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 !
New Zenner
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. :-)
Black Belt
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.
Tell staff why this post should be reviewed.