0

I want to add an additional field to the orders that are created by Recurring Profiles, the field is in the database in the table sales_recurring_profile in the order_info column. The field I want on the orders is called tm_field1 and it adds delivery instructions to the orders. Looks like this in the db

 s:9:"tm_field1";s:20:"Leave somewhere safe";

If I look in

app/code/core/Mage/Sales/Model/Recurring/Profile.php

At the following

public function createOrder()

I can see the array is read by

$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'
    );

Im guessing that just adding tm_field1 to the array is too easy and will need some additional code somewhere just not sure where?

1 Answer 1

0

Turns out it really was that easy all I have done is add the field to the array and it works

$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',   'tmfield1'
);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.