Hooks in admin and collecting data saved

Hi guys, im a little stuck with something - i have an input in admin when editing a product - i enter a value and save it (it saves to database) however i want to show the saved value in the input of the product im editing but cannot work it out

ive tried product_data.blah but no go

ive also tried with hooks

$view->assign(‘product_data’, $product_data);

etc… with no luck, anyone have any ideas?


if your new field is not pulled with the standard fn_get_product() then you will need to use a 'addons/my_changes/controllers/admin/products.post.php' controller.

You would extract the current product data via:

$product_data = Registry::get('view')->get_var('product_data');
// $product_data['new_field'] = db_get_field("SELECT new_field FROM ?:products WHERE product_id=?i", $_REQUEST['product_id']);
// Then write it back to it's visible to the template
Registry::get('view')->assign('product_data', $product_data);