My OEM parking sensors packed in, so I opted for a cheap aftermarket kit.
Thought I'd share a few things about the retro-fit on a E46 pre-facelift (sensors in plastic strip).

Disconnect and remove the original PDC unit:
Use a flat-head screw driver to remove the head of the emergency fuel release cable (the green tab above the battery compartment in the boot). This makes it much easier to pull back the boot lining above the battery compartment.
Un-plug both white and black connectors from the OEM PDC unit.
Losen the two nuts holding the OEM PDC in place and remove.

Remove OEM sensors without removing bumper strip:
Use the wheel lock nut to push in the original PDC sensors. These will just fall through the bumper where the connector can be removed (in my case I cut the OEM cable ends off so that they did not rattle around the bumper).

Install new sensors:
There is a secondary rubber seal within the battery compartment which feeds to behind the rear bumper.
Install the new sensors.
Use a long piece of string through the seal from within the boot so that it ends up on the ground by the bumper.
Tie the string to the ends of the parking sensor wires and pull them up carefully into the boot.
Use cable ties to make sure the parking sensor wires do not rest on the exhaust or heat shields!

Install new PDC:
Cable tie the replacement PDC in place of the original PDC.
Cable tie the replacement PDC speaker / chime unit somewhere audiable within the boot.

Wiring in the new PDC:
Locate the black connector block which went to the original PDC unit.
Use the yellow / blue wire from this for the new PDC positive wire.
Use the brown / black wire from this for the new PDC negative wire.
The yellow / blue wire is linked to the reverse light so will only activate when reverse is engaged. Using this wire rather than the one directly into the reverse light stops the problem common with retrofit PDC units of showing the reverse light failure warning.