The central locking control ECU is located in the boot, left side behind the carpet, more or less opposite the boot lid hinge.
If you remove this ECU and open it up you will find an 8 pin integrated circuit chip plugged into a socket on the board, this is programmed to the key you have.
If you replace the chip in you car’s central locking ECU with the one from the donor it should then work with the key you have in your car.
Or just fit the donor car ECU in your car but check to make sure the part numbers of both ECUs are the same.
Which ever method you chose be sure to disconnect the battery first.
Changing the key blade is difficult as it is bonded into the housing and there is a wire soldered to it for the aerial, if you do open the fob be careful to avoid the push button and spring flying out, never to be seen again!
The usual cause of the alarm triggering when opening doors is a dodgy door light switch, a good dose of contact cleaner usually proves effective.
If you want any help and a trip to Derbyshire let me know.