The European Parliament has approved rules allowing consumers to have worn-out products repaired by manufacturers.