Ok, well I got it working in a testing environment but honestly, it is NOT the way to go for this sort of thing. Basically I checked if product_id's were in the products array and if so then zen_mail to a variable that stores the additional email address to send to. I copied the SEND_EXTRA_ORDER_EMAILS_TO function, chopped it up and rewrote large bits of it to do what I needed. Again though, it's not really a great solution because I'll need to add email addresses in the future for other products for other posts.
So, I've been looking at the notifier in includes/modules/checkout_process.php. I'm thinking that the way to go with this would be to create a full fledged add-on that can be controlled from the admin. What I need is this:
A form on the admin side that will let me specify a product(s) that triggers an email to a specified email address. Basically we have other Posts that want to have their new memberships and renewal on our storefront, when someone signs up (buys one of those products) then the Commander of the Post who's membership was purchased will receive an email. This is in addition to the emails that get send by the admin system anyway. So, if product 1 is purchased then bob jones in Denver gets an email. if product 2 is purchased then john doe in Colorado Springs gets an email, but bob jones doesn't.
Does all that make sense?
So, my question here is, where would I start in writing an add-on and is there any big pitfalls I should keep in mind while doing this?
And where would I start with the notifier system, I feel like I'm missing something with the notifier system, I see where it auto loads in config.core but I don't see any kind of constructor for it. I don't really understand what controls it's behavior.
I've never taken my Zen Cart knowledge this far, it's mostly been templates, custom forms and such on the front end. I'm also a bit weak on the OOP side of things, so it takes me a while to see what's probably painfully obvious to everyone else.
Any and all thoughts are greatly appreciated. I know it sounds like a heck of a mess to figure out but I need to come up with something.
Thanks,
Michael
p.s. just realized I logged in under my other account. this is LegionSmith