Catalyzes the conversion of S-adenosyl-L-methionine (SAM) to carboxy-S-adenosyl-L-methionine (Cx-SAM). prephenate + S-adenosyl-L-methionine = 3-phenylpyruvate + carboxy-S-adenosyl-L-methionine + H2O Homodimer. Mechanistic analyses show the involvement of a unique ylide intermediate as the carboxyl acceptor in the conversion of SAM to Cx-SAM. Belongs to the class I-like SAM-binding methyltransferase superfamily. Cx-SAM synthase family.