Perhaps the old alternator was over charging, which would have fried the battery and melted the wiring.
If that is the case then just swopping out the battery and alternator is not a permanent fix as the faulty wiring will still need to be sorted or your car may well go on fire.
Then you will have the hassle of a big total loss insurance claim.