wiziwig Posted July 19, 2009 Share Posted July 19, 2009 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 More sharing options...
Ion_Cannon Posted July 19, 2009 Share Posted July 19, 2009 I've always wondered about this... I think it's pretty retarded. Why can't they just update the entry in the database? Link to comment Share on other sites More sharing options...
Star Posted April 23, 2010 Share Posted April 23, 2010 Eihwaz just wrote a tutorial on why the Prestashop made it this way and how to work around it here.http://www.eihwazblog.com/modules/newscore/news.php?id_entry=5 Link to comment Share on other sites More sharing options...
Recommended Posts