Page 1 of 1

Editing payment.tpl - without breaking it!

Posted: Tue Jul 05, 2011 6:42 pm
by olstar
Oh hai!

I wanna remove the "add comments to your order" part, but every time i comment it out or remove it, i cannot get past that part of the checkout it simply stops (click the button it does nothing)

Any thoughts?

Thanks guys!

Re: Editing payment.tpl - without breaking it!

Posted: Tue Jul 05, 2011 6:53 pm
by Qphoria
you can't remove it, you'd need to instead change it to use a hidden input with the same name so that the form passes back an empty value for that form item.

change the <textarea name="comment"......>
to
<input type="hidden" name="comment"......

Re: Editing payment.tpl - without breaking it!

Posted: Tue Jul 05, 2011 8:50 pm
by olstar
Hi Mate,

that worked (as in it removed it from the checkout) but i still couldn't go any further..

The button moves when clicked (mouseover) but doesn't do anything...

Just noticed that there is a details about order box on the tab before also, tried this method of removing that and it didn't work either.

Need them both going really :(

Re: Editing payment.tpl - without breaking it!

Posted: Wed Jul 06, 2011 6:37 pm
by olstar
Hi Guys,

Had another play, still no joy..

Anyone with any pointers? :)

Re: Editing payment.tpl - without breaking it!

Posted: Tue Jul 12, 2011 12:41 am
by olstar
Hi Guys,

Any news on this?

Got an awesome site built in opencart, and this is the last piece of the puzzle!!!!

THANKS :) O0

Re: Editing payment.tpl - without breaking it!

Posted: Wed Jul 13, 2011 6:26 pm
by olstar
Ok this makes me a sad panda :(

Tried again, still no joy!

PLEASEEEE help!!! ???

Re: Editing payment.tpl - without breaking it!

Posted: Mon Jul 18, 2011 11:41 pm
by dijitul
Think the easiest way would be to delete the:

Code: Select all

<b><?php echo $text_comments; ?></b>
And give the form a class, ie hidden:

Code: Select all

<textarea class="hidden" name="comment" rows="8" style="width: 98%;"><?php echo $comment; ?></textarea>
Then open your CSS and add this:

Code: Select all

.hidden {display:none !important;}
Rinse and repeat in shipping.tpl if you wish to remove the shipping comments too.

^Abit of a bodge fix but keeps the code there in case the client wants it back :joker: