Parties agree on code of conduct for Sept 3 election