There are many, many ways making a zipper fly. I've sewn countless pair of trousers and has over time developed a method that works for me. I like this way because it gives me good control of the process which makes the result very predictable. In this example I'm using denim fabric with double stitches in a contrasting colour.
This tutorial assumes a men's trousers with the opening to the right side. If you want the opening to be on the left side (as in women's trousers) you need to mirror everything.
The time I normally attach the zipper is when all the main pieces of the trousers are ready to be sewn together. Which means notches, pleats and pockets are applied. I prefer sewing the front pieces together and the back pieces together before joining them on the side- and inseam.
Above we have the two front pieces, the zip cover, the facing and of course the zipper. The facing is exactly the same size and shape as the cover. It also have a fusible interfacing attached to it. I prefer a stiffer one, like Vlieseline H250 or equivalent.
The seam allowance on the right side (where the zipper is attached) should be at least 1,5cm.
I normally use 1cm seam allowance, which means I need to extend this part by 0,5cm. This is only necessary on the right side.
Note where the end of the zipper (red arrow) is and make sure your crouch seam starts below this point. The length of the facing should be the same as your whole zipper, or longer.
Sew the cover pieces right sides together along the curved edge. Trim with a pinking shears or make notches with a regular scissors. Turn right sides out, press and sew a topstitch along the curved edge.
Overlock or zigzag the straight edge of the cover and the curved edge of the facing.
Sew the crouch seam. Start about 0,5cm - 1cm below the end point of the zipper. Also make sure your crouch seam starts above the length of the facing.
Press the seam open and pin the facing to the left leg piece.
Sew and make sure the facing seam ends up slightly inside the crouch seam. Not on top of it, and definitely not on the outside!
Turn the facing, press and topstitch. Your topstich should end around where the crouch seam starts.
With your zipper foot, sew the zipper (upside down) about 7-8mm from the edge on the right leg piece.
Turn the zipper around and press the fabric.
Align the zipper on the facing, pull it over as far as you can at the bottom. Put a mark. Measure the distance of the mark from the edge and make another mark on the top. Make a line parallel to the edge.
Sew the other side of the zipper along the line. Make sure you open up the facing first.
Draw the shape of your topstitch and pin the facing. Note that your topstitch should start where your previous topstitch ends. If you want double topstitch, this is your inner one.
Sew the topstitch. Notice my second topstitch is on the outside.
Sew the cover to the back side of the zipper along the edge of the seam allowance.
Turn around and topstitch. Sew as far down as you can. It doesn't really matter if you don't reach the end. Depending on your presser foot you may have about 1cm left. This is normal. Just leave it like that.
Stitch the cover to the facing. In my case with double topstitch I had almost no seam allowance left on the facing, but I managed to find a tiny spot to secure the cover on.
If needed, topstitch the crouch and we're done!