How to Quickly Repair A Broken Zipper

I put on these jeans and the zipper broke. In the above picture, the zipper slider came off the zipper track.  So, I had to do a quick fix to get the slider back on track.  It seems that it should just slide back on to the tape part, but trust me, it’s an impossible task.  Plus, I know that to replace the zipper entirely