I had trouble getting the gift order template to be sent from the system. I copied it into the correct ubercart themes directory as instructed, but no luck.
Looking through the code I saw this starting on line 107:
/**
* Implementation of hook_uc_invoice_templates().
*/
function uc_gift_order_uc_invoice_templates() {
return array('gift_order');
}
I believe it should read this:
/**
* Implementation of hook_uc_invoice_templates().
*/
function uc_gift_order_uc_invoice_templates() {
return array('gift_message');
}
Where 'gift_order' is changed to 'gift_message' to match up with the naming convention on the .tpl.php file included in the module. I suppose you could also change the name of the template file, but this is the way I did it.
Hope this helps.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | uc_gift_order.patch | 431 bytes | nathanjo |
Comments
Comment #1
nathanjo commentedTrue. The code is mismatch with the template file. This should be fix.
I find it easy just to change the template filename to uc_order-gift_order.tpl.php when copying to uc_order/templates
Comment #2
nathanjo commentedAttached patch that change return array('gift_order') to return array('gift_message').
Comment #3
tomw commentedHi,
Thanks for sharing the patch, it was my prefered solution.
----
Just to provide the feedback if needed for others.
In order to make the change on line #107 work as mentioned above, I also had to change line 207 from:
$output = theme('uc_order', $order, 'print', 'gift_message');to:
$output = theme('uc_order', $order, 'print', 'gift_order');----
But the patch takes care of it and hopefully it will make it into the next release.
Tom