Hello,
I know this is a popular question, selling event tickets through ZenCart.
I have searched the forum and was unable to find much help for this.
(There is a thread about using SuperOrders to create a Doorlist, but I have not been able to get the Mod working, since it does not explain how it is supposed to work. So I decided to try going my own way on this one.)
I was looking to do something simple, when a customer purchases a ticket, included in the confirmation email is a randomly generated passkey for the number of tickets purchased. I managed to get this to happen by adding some code to the orders.php file in includes/classes/
After some trial and error, I got the code to work fine, when the purchase happens, the email sent includes a nine digit alpha numeric code as I planned. I was very proud of myself, until I tested the piece of code making a purchase for two separate event tickets. I received a fatal error, my coding skills are not the greatest.
I tied into the // build output for email notification
Using $this->products[$i]['qty'] to count the number of codes to generate.
Then just used a switch and an if loop to create the random numbers and letters
I just have a general question about how the email is built, and if someone could point me in the direction. I wanted to know what processes happen when more than one product is purchased, and if anyone could show me what area or file I would have to tie into to avoid this problem.
Any help would be appreciated.



