This is a tricky situation for the party since undead are dang near impossible to subdue in that way. They're immune to sleep, nonlethal damage, paralysis, and pretty much any other effect you'd use in a "capture instead of kill" scenario, and you can't beat them into negative health like most creatures since they're destroyed as soon as they hit 0.

The most effective way to do it would be to cast Command Undead on them; mindless undead don't get a save to resist, and you can just corral them into a safe place where you can seal them up for the villagers to deal with later.
The Command Undead feat would be useful as well, since it potentially has more uses per day and an effective duration of "endless", though you'll have to deal with the HD limit and the possibility of the zombies passing their Will saves. There are other ways to handle undead without killing them, but those either require magic that a 6th level party wouldn't have (halt undead) or are inefficient for keeping them contained (like Turn Undead, which will just cause them to scatter).