startSetup(); $connection = $installer->getConnection(); $table = $installer->getTable('core/config_data'); $select = $connection->select() ->from($table, array('config_id', 'value')) ->where('path = ?', 'checkout/options/onepage_checkout_disabled'); $data = $connection->fetchAll($select); if ($data) { try { $connection->beginTransaction(); foreach ($data as $value) { $bind = array( 'path' => 'checkout/options/onepage_checkout_enabled', 'value' => !((bool)$value['value']) ); $where = 'config_id = ' . $value['config_id']; $connection->update($table, $bind, $where); } $connection->commit(); } catch (Exception $e) { $installer->getConnection()->rollback(); throw $e; } } $installer->endSetup();