Jump to content

AdminCarrier - updating always create a new record


Recommended Posts

I have been updating the carrier details every now and then and the realized created a lot of deleted records. Went to check the code and every time user update the Carrier details, the system will marked the existing one as deleted and create another record.

Is this behavior by design?

A simple update code like this would have retain the use of existing row.

if ($this->tabAccess['edit'] === '1')
{
 $object = new $this->className($id);
 if (Validate::isLoadedObject($object))
 {
   $this->copyFromPost($object, $this->table);
   $result = $object->update();
   Tools::redirectAdmin($currentIndex.'&id;_'.$this->table.'='.$object->id.'&conf=4'.'&token;='.$this->token);
 }

Link to comment
Share on other sites

  • 9 months later...
×
×
  • Create New...