add ajax and checkout logic