this should give you an idea of how these things work. this is the best diagram ive seen to give you an example of how some are wired. if you buy a custom harness, the wires that go to the fog lights would need to be cut from the original harness and the new fog light harness would splice to the old connectors from the old harness. it is very easy to do.
one easy way to fix the problem would be to buy a fog light kit like this for your truck and use the wiring harness that it comes with and splice your old fog lights into this fog light harness.