I'm looking for a bit of code to add a gift message to existing order programmatically in Magento.
====================
An update
I like that moderators (@Charles, etc etc) flagged this question as not real even though it had 228 views - obviously no one really having same issue... lol Would be great to see up-vote from everyone who reads it. How much more specific can you be? lol
$giftMessage = Mage::getModel('giftmessage/message');
$giftMessage->setCustomerId($customer->getId());
$giftMessage->setSender('sender']);
$giftMessage->setRecipient('recepient');
$giftMessage->setMessage('message');
$giftObj = $giftMessage->save();
$order->setGiftMessageId($giftObj->getId());
$order->save();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With