1

I've got the folling problem:

I've got a new database field ( made with upgrade script ) to api/user table.

Now it's showing the field, but when I enter a value, it will not save.

Table field in db is called: ip_address, code to show in adminhtml:

File: Mage_Adminhtml_Block_Api_User_Edit_Tab_Main

I know, i know! Going to extend it later, first want it to work!

$fieldset->addField('ip_address', 'text', array(
    'name'  => 'ip_address',
    'label' => Mage::helper('adminhtml')->__('IP Adres'),
    'id'    => 'ip_address',
    'title' => Mage::helper('adminhtml')->__('IP Adres'),
    'required' => true,
));

Already TRIED/CHECKED:

I already tried logging out and back in, flushing all caches possible in backend and even delete contents of var/cache folder.

When I change an other value, it saves correctly. So I think I'm missing something.

Post is good, ip_address is in $data.
getData('ip_address') is set.
Also tried setData('ip_address', getData['ip_address'])) and setData('ip_address', $data['ip_address']), also did not work.
If I fill database field manually, it will return it in backend, so that's good too..

1

Take a look at app/code/core/Mage/Api/Model/User.php file

You'd add the logic you need for your custom field in save() method, as it looks for very concrete data & it is ignoring any other field than expected

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.