public function commit()
 {
     global $db;
     $ac = $db->is_autocommit();
     if ($ac) {
         $db->autocommit(false);
     }
     if (isset($this->_old_price) && $this->_old_price != $this->price) {
         $log = new ProductLog();
         $log->user_id = $_SESSION['login'];
         $log->old_price = $this->_old_price;
         $log->new_price = $this->price;
         $log->product_id = $this->id;
         $log->commit();
     }
     parent::commit();
     if ($ac) {
         $db->commit();
         $db->autocommit(true);
     }
 }