2 simple product options can solve this without MUCH backend modifications.
First product option of "Gift Wrap" with "No"/"Yes=+20" or however much you want to charge for the Yes selection.
The other would be setup like so: Option class should be "ShipGift", option text can be whatever you want to be displayed next to the field, I did "If you want to ship this gift elsewhere, enter Address". Now leave Option list blank.
Now edit: skin1/modules/Product_Options/customer_options.tpl:
Replace the below code:
Code:
<input type=text name="product_options[{$product_options[product_option].optclass}]" size=32>
With this:
Code:
{*** allow textarea instead of input area for larger input ***}
{if $product_options[product_option].optclass eq "ShipGift"}
<textarea name="product_options[{$product_options[product_option].optclass}]" COLS=42 ROWS=10></textarea>
{else}
<input type=text name="product_options[{$product_options[product_option].optclass}]" size=32>
{/if}
{*** end ***}
Now any product option class that is "ShopGift" will have a large textarea to insert data. This is where your user can insert the Address the Gift should be sent to.
Simple solution, I'm doing the same (sorta) thing on
www.cartlab.net for the product Notes. If you want to see it in action.
If you want to insert some data into the textarea (ie. Insert the shipping address here) Just put this text inside the <textarea ...>Insert text here</textarea>.
Why re-invent the wheel?