I like to warm up on the treadmill for 5 minutes and then lift. Save the cardio for after. You dont want to use up your strength and energy before lifting weights.
If you do cardio and weights on the same day, probably the best way of doing it will be alternating between the order of the routine, so one week for example you can start with cardio and the next week with weights.
I split them in two daily sessions of cardio early in the morning and gym late afternoon. This way I give my body enough time to recover and I am ready for another intense session. I’m not capable to hit the gym immediately after the cardio.