and add the column name in the array under function public function getUpdatableFields() and then goes to save the form with some value, then it updates.
So… is there something missing in a module or any leads?
Any leads? The additional field creatd in user_billing.tpl doesn’t get updated, but when i go to the user from admin panel and updates that field from input field, it gets update.
I am not also getting any errors in log, so that’s why i am bit confused.
Just a little heads up if someone falls on to this topic.
I had a problem where some extra fields via module weren’t inserting in the database, So i extended the save() function from User’s model and implemented that under my module.
So far, it worked pretty fine when i was playing with billing address form in my accounts section after logging in. But i never checked if the regisration of new user worked fine too.
Few months later now, i checked and user registration weren’t working and the problem was the save() function i extended in my module.
Turns out, i also had to this little tweak which was missing logically before. Here it goes:
public function save()
{
$blRet = parent::save(); // this should be taken in variable and then returned
$oUser = $this->getUser();
$id = $oUser->oxuser__oxid->value;
$_oUserData = Registry::getRequest()->getRequestParameter('invadr');
if ($_oUserData == NULL || $_oUserData == '') {
$_oUserData = Registry::getRequest()->getRequestParameter('editval');
}
$sql = "UPDATE oxuser SET some_awesome_column = '" . $_oUserData["oxuser__some_awesome_column"] . "' WHERE oxid = '$id'";
$db = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC);
$db->execute($sql);
return $blRet; // returned right here
}