I'm trying to add an entry to a custom table with a data-install script but it isn't setting the data when I call ->save()
method it just add an empty value in the field.
I have updated the config.xml file and the script is running but not adding the entries.
Here is what I have tried:
$values = array(
'id' => 1,
'customer_id' => rand(),
'prima_id' => rand(),
'guest' => 0,
'email' => '[email protected]',
);
$data = Mage::getModel('modulename/tablename');
foreach($values as $key => $value) {
$data->setData($value)->save();
}
For some reason the $value is not being set and saved and I can't see why?