When using Magento's recurring profile if you add custom options to the product it brings through the custom options to the customers profile however it doesn't add them to the actual order.
app/code/core/Mage/Sales/Model/Recurring/Profile.php
In the function it adds the item info
public function createOrder()
{
$items = array();
$itemInfoObjects = func_get_args();
$billingAmount = 0;
$shippingAmount = 0;
$taxAmount = 0;
$isVirtual = 1;
$weight = 0;
foreach ($itemInfoObjects as $itemInfo) {
$item = $this->_getItem($itemInfo);
$billingAmount += $item->getPrice();
$shippingAmount += $item->getShippingAmount();
$taxAmount += $item->getTaxAmount();
$weight += $item->getWeight();
if (!$item->getIsVirtual()) {
$isVirtual = 0;
}
$items[] = $item;
}
There is also this function that seems to get the custom options
protected function _addAdditionalOptionToItem($item, $option)
{
$options = $item->getProductOptions();
$additionalOptions = $item->getProductOptionByCode('additional_options');
if (is_array($additionalOptions)) {
$additionalOptions[] = $option;
} else {
$additionalOptions = array($option);
}
$options['additional_options'] = $additionalOptions;
$item->setProductOptions($options);
}
Also this function in which I have already added one extra field.
$transferDataKays = array(
'store_id', 'store_name', 'customer_id', 'customer_email',
'customer_firstname', 'customer_lastname', 'customer_middlename', 'customer_prefix',
'customer_suffix', 'customer_taxvat', 'customer_gender', 'customer_is_guest',
'customer_note_notify', 'customer_group_id', 'customer_note', 'shipping_method',
'shipping_description', 'base_currency_code', 'global_currency_code', 'order_currency_code',
'store_currency_code', 'base_to_global_rate', 'base_to_order_rate', 'store_to_base_rate',
'store_to_order_rate', 'tm_field1'
);
But I'm not sure what I need to add to the createOrder function so that the custom options come through on the order.