i'd take it to a BMW dealer as its still covered under warranty and the
repair will be free. they may even give you a loaner while they fix it
so you don't have to sit at the dealership. mention it when you call
them especially if its from the dealership you purchased it from.
The remote is not working properly. If possible get the remote serviced at any authorized center & if not serviceable you have no option but to replace the set with a compatible set.......sodeep (but before you do that if the remote has batteries and they have been in use for quite some time then change those batteries & give it a trial)
It sounds like the key needs reprogramming. When the battery was removed, it lost its memory. Visit the Dealership, and Auto-Electrician or an Alarm Installer.
Check microswitch in bonnet catch using a multimeter in continuity setting. To do this you will need to disconnect the microswitch connector and remove.
Watch the video:
https://www.youtube.com/watch?v=RpFbQQQnvO4
If you short the connector with a piece of wire and check the dash. This will simulate a switch closure. If it still shows bonnet open, then the wiring from the bonnet sensor switch is damaged and will need to be fixed.
alot of trimmers know how to do plastic welding and repairs to some plastics
ask or look up some of your local motor trimmers or bumper bar painters repair people