Zen Cart Logo
Forums / General Questions / How to add predefined text to Special Instructions or Order Comments field?

How to add predefined text to Special Instructions or Order Comments field?

Views: 1,061

Results 1 to 5 of 5
15 Apr 2014, 1:09 PM
#1
wazer avatar

wazer

New Zenner

Join Date:
Apr 2014
Posts:
12
Plugin Contributions:
0

How to add predefined text to Special Instructions or Order Comments field?

So i want to like add predefined text inside the order Special Instructions or Order Comments structure

So when they come to the checkout the Special Instructions or Order Comments is already filled out with pre text that they just need to add more like example

size:
height:
color:

.

I found define('NO_COMMENTS_TEXT', 'None'); but that text is added AFTER after "continue to checkout" / Step 2 out of 2.

Any luck with that?

15 Apr 2014, 1:47 PM
#2
wazer avatar

wazer

New Zenner

Join Date:
Apr 2014
Posts:
12
Plugin Contributions:
0

Re: How to add predefined text to Special Instructions or Order Comments field?

Edit.

The pre text goes inside the Special Instructions or Order Comments

15 Apr 2014, 2:36 PM
#3
wazer avatar

wazer

New Zenner

Join Date:
Apr 2014
Posts:
12
Plugin Contributions:
0

Re: How to add predefined text to Special Instructions or Order Comments field?

Think i nailed it..

Find this file
includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_shipping_default.php

change text from

<?php echo zen_draw_textarea_field('comments', '45', '3'); ?>

To

<?php echo zen_draw_textarea_field('comments', '45', '10', 'size: height: color:'); ?>

Now how would i put the text up in structure? as for now it goes into 1 straight line, i cant use html tags inside it without showing?

like

size:
height:
color:

and not

size: height: color:
15 Apr 2014, 2:49 PM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to add predefined text to Special Instructions or Order Comments field?

Far as I know, you can't use markup there, so you may have to add spaces between the words.

15 Apr 2014, 3:13 PM
#5
wazer avatar

wazer

New Zenner

Join Date:
Apr 2014
Posts:
12
Plugin Contributions:
0

Re: How to add predefined text to Special Instructions or Order Comments field?

stevesh:

Far as I know, you can't use markup there, so you may have to add spaces between the words.

I just tested with


and it works beautiful :P

so

message
ANOTHER_MESSAGE

It might be missing the & infront of #10;

gives

message
ANOTHER_MESSAGE