If an agent acts legally and within the instructions of his principal then only the principal can be sued by the purchaser for any breach of contract. However, if the agent acts outside his/her instructions then he/she may be liable to the principal and possibly the third party for any damages suffered by them and because of the agent's actions. There is still a binding contract between the principal and the third party.

duty of care