Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento 1.9.2 - Save custom admin form product new & edit page (custom tab)

I achieved to add a custom tab / grid to the product new & edit page with an input field inside. Following this tutorial

The problem is that it's not saving the data input. And at this point I have no idea if this is actually not covered in the tutorial or I made a mistake.

Is this enough to save the data input?

$customFieldValue =  $this->_getRequest()->getPost('custom_field');

$product->save();

How could I debug this value in the backend?

like image 752
Entertain Avatar asked Nov 08 '22 23:11

Entertain


1 Answers

It is not covered by tutorial. To see the difference you probably have to add new attribute to product and then do something like:

$customFieldValue =  $this->_getRequest()->getPost('custom_field');
$product->setNewAttribute($customFieldValue); 
$product->save();
like image 164
Grzegorz Avatar answered Nov 14 '22 22:11

Grzegorz