Guest Posted June 29, 2009 Posted June 29, 2009 Is there a way to generate an email to a specific address if a customer purchases a specific product or category? We run a non-profit that takes donated cars, clothing, furniture and other items and distributes them back out to the community free of charge. Everything on our site is proced at $0, but the execs would like an email generated when someone "buys" a car from the site because of how many details have to get processed in the title transfer...this would be in addition to the standard email that is generated when anything is purchased. Any thoughts?
masat Posted June 29, 2009 Posted June 29, 2009 Will the "send extra order emails to" not work for you? No that does not mail based on a specific product... If you look on checkout_process around line 284 or so you will see where the amil gets sent and also where the "SEND_EXTRA_ORDER_EMAILS_TO" occurs. This should give you a starting place as to what needs to happen. If you have to have an email sent to a specific address based on a specific product you are gong to have to progmatically "fish out" the product purchased and add another line like the above either before or after the "SEND_EXTRA_ORDER_EMAILS_TO" occurs but before the $payment_modules->after_process(); is called. Not an easy task but very doable. Something like the following... // send email to specific address based on product purchased if ($product_purchased == $product_id) { tep_mail('specific recipient', '[email protected]', 'Subject of specific mail', $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } You are on your own with the fishing part but you should be able to use the php in_array function to get a specific product_id. Good Luck How do you know when you know what you want to do for the rest of your life?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.