Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

HELP! Need to modify checkout Comments text box


murph

Recommended Posts

If anyone could help it would be SO much appreciated!!!

 

I need to make changes to the "add comments about your order" section on checkout_shipping.php page.

 

Right now it has the sentence "add comments about your order" above a text box. I know where/how to change the wording of this sentence in the english folder, not a problem.

 

But I need to ADD below that new sentence "Is this a gift?" 2 things:

 

1) a dropdown box for choosing "yes" or "now"

 

2) then if they choose yes, they choose the occasion from another dropdown box.

 

and THEN they can write comments in the text box that would be like a gift card message etc.

 

I know how to do the dropdown boxes in html and can figure out the php but WHERE is that current textbox called up in the files? I can't find it anywhere.

 

And then I need to know if I add those dropdown boxes how do I get that info to continue with the order so that the store owner gets those answers AND the comments message in the order email?

 

Help please if you can....desperate here :'(

Link to comment
Share on other sites

Ok, Brenda - take a deep breath. Now let it out. Feeling calmer? Ok...

 

The code that displays the text box is this:

 <td><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?></td>

 

Adding a new field to the order has three parts:

 

1. Adding the interface for the field so that the user can enter it.

2. Adding the value to the order record in the database. Thie requires defining the field in the orders table, and making sure that the user's value gets included in the database record when it is created (or updated).

3. Displaying the value where required, such as in admin (so you know the customer asked for a gift card) and in the catalog section so that the user can see it when they look at their order.

 

Your first step should be to browse/search the Contributions (see link at top of this page) to see if someone else wanted to do the same thing. It's highly likely.

 

If not, then find a field that is of the same type as what you want (such as the comments text), find all the places THAT is referenced in the store files, and make a similar addition for your own value using the same method as is already used.

 

Good luck!

Link to comment
Share on other sites

Ok, Brenda - take a deep breath.  Now let it out.  Feeling calmer? Ok...

 

The code that displays the text box is this:

 <td><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?></td>

 

Adding a new field to the order has three parts:

 

1. Adding the interface for the field so that the user can enter it.

2. Adding the value to the order record in the database.  Thie requires defining the field in the orders table, and making sure that the user's value gets included in the database record when it is created (or updated).

3. Displaying the value where required, such as in admin (so you know the customer asked for a gift card) and in the catalog section so that the user can see it when they look at their order.

 

Your first step should be to browse/search the Contributions (see link at top of this page) to see if someone else wanted to do the same thing.  It's highly likely.

 

If not, then find a field that is of the same type as what you want (such as the comments text), find all the places THAT is referenced in the store files, and make a similar addition for your own value using the same method as is already used.

 

Good luck!

 

 

Thanks SO much for taking the time to reply :)

 

OK - a question:

 

WHERE is that code you mentioned....which file is it in?

 

 <td><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?></td>

 

Had already checked all thru contributions and couldn't find anything...so I guess I am on my own here :huh:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...