Extra Data In Cart Content

I want to display some extra data for each product inside cart content menu. Getting data from other database is not a problem, however I am having troubles with passing this data to cart_content.tpl. I have tried it simple and added this inside fn.cart.php's fn_add_product_to_cart function.

foreach ($product_data as $key => $data) {

$data['test'] = 'testing';


However, I don't have an access to variable 'test'. What am I doing wrong?

Thank you.

I have also found answer to this question myself. I had to add extra variable into $cart['products'][$_id]['extra'] = 'some_value';