Yes. A person different from the one who is going to travel can buy the tickets online. The important thing is that the passenger's information is recorded in the document to be printed and delivered to the different ticket offices.