I'm working on adding fields to the Gift Wrap section of 4.4.1. I want to add a "To:" field, and a "Occasion" field.
Here's what i did:
in /modules/Gift_Registry/place_order_extra.php, below this:
PHP Code:
$_extra['giftwrap'] = array(
'need_giftwrap' => @$cart['need_giftwrap'],
'giftwrap_cost' => @$current_order['giftwrap_cost'],
'taxed_giftwrap_cost' => @$current_order['taxed_giftwrap_cost'],
Add these 2 lines:
PHP Code:
'giftwrap_to' => @$cart['giftwrap_to'],
'giftwrap_occasion' => @$cart['giftwrap_occasion']
In /skin/common_files/modules/Gift_Registry/gift_wrapping_cart.tpl, below:
Code:
<textarea class="message-text" name="giftwrap_message" rows="5" cols="20">{$cart.giftwrap_message|escape}</textarea>
Add:
Code:
{*MMonaco - 11/23/2010*}
<textarea class="message-occasion" name="giftwrap_occasion" rows="1" cols="2">{$cart.giftwrap_occasion|escape}</textarea>
<textarea class="message-to" name="giftwrap_to" rows="1" cols="2">{$cart.giftwrap_to|escape}</textarea>
{*/MMonaco - 11/23/2010*}
In /modules/Gift_Registry/giftreg_customer_cart.php, below:
PHP Code:
$cart['need_giftwrap'] = $need_giftwrap;
$cart['giftwrap_message'] = stripslashes(trim($giftwrap_message));
Add:
PHP Code:
//MMonaco Gift Wrap 11232010
$cart['giftwrap_occasion'] = $giftwrap_occasion;
$cart['giftwrap_to'] = $giftwrap_to;
//MMonaco Gift Wrap 11232010
You'll quickly notice that the actual input boxes on the checkout screen aren't done. I'll have my web designer do that, but i wanted to post this before i forgot what i did.
One thing i also didn't add was a way to see the variable in admin. I pull it straight from the database for what i do, and i'm really not sure how to get it to show up in the admin section. Perhaps someone can chime in on that.
I hope this helps someone.
Matt