NewBudda Posted July 14, 2008 Posted July 14, 2008 I need to send a pdf copy of my Terms & Conditions every time a customer orders something from my shop (osC 2.2RC1). I am sure this can and has been done before, I just can't find it in the forums. A pointer to the right topic would be very much appreciated! Open Source Newsletter: PhPList Open Source Questionnaire: Lime Survey
NewBudda Posted August 5, 2008 Author Posted August 5, 2008 Any ideas? I have found the "Invoice & Packingslip Contrib" but thats way too compliacted. Something simple would be great, after all its always teh same attachment... Open Source Newsletter: PhPList Open Source Questionnaire: Lime Survey
daddy Posted August 5, 2008 Posted August 5, 2008 have you read this contrib? http://www.oscommerce.com/forums/index.php?sho...14&hl=price it may help
NewBudda Posted August 5, 2008 Author Posted August 5, 2008 Thank you for the Link but its not what I mean. german law requires me to send my terms and conditions as an attachment every time some get the order. A link within the mail is not enough. I deally I would like to be able to just point to the file in the admin section and that file gets automatically attached to every mail... Open Source Newsletter: PhPList Open Source Questionnaire: Lime Survey
arietis Posted August 6, 2008 Posted August 6, 2008 Thank you for the Link but its not what I mean. german law requires me to send my terms and conditions as an attachment every time some get the order. A link within the mail is not enough.I deally I would like to be able to just point to the file in the admin section and that file gets automatically attached to every mail... i haven't looked at that part of the code for a while...so standard disclaimers apply. :) i'd start by modifying the includes/functions/general.php file. look for the tep_mail() function and add a new parameter that defaults to null. later in the function where it's calling $message->add_html() and $message->add_text()...after those, check for your new parameter != null and call the $message->add_attachment($pdf_file) method. then, in checkout_process.php, when it calls tep_mail() for the first time (this is the customer's copy of the email), you can add the name of your pdf file as the last parameter to tep_mail(). the other calls to tep_mail() won't have the parameter, so inside tep_mail() it'll be null and therefore the pdf file will not be attached in those mails. i'm assuming you don't want to get a copy of the pdf yourself.... :) that should get you most of the way there. of course, if you want to add something to admin to allow you to specify the pdf file for attachments, you can do that -- then use that value to pass to tep_mail() inside the checkout_process.php file. that should be little more than inserting a new configuration key into the appropriate area. have fun with it.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.