Ciscowrig Posted March 24, 2010 Share Posted March 24, 2010 I thought that I had seen this solution somewhere, but I've searched and can't find it so I'll askI would like the ability to send a message to the customer using the adminorders tab. That I know how to do, but I would also like to attach a document with that message. We work with some businesses that require a certain form to be filled out by us, if we can attach it to the message telling them the document is ready that we currently send from our adminorders screen it would save another email being generated. We enter the document number in the adminorders screen so there is a record of that number that is associated with the order. I attached screen shots if they help Link to comment Share on other sites More sharing options...
olivierterlez Posted April 15, 2010 Share Posted April 15, 2010 Have you found ? I'm looking for too. If not, i'm gonna try to find and to include the code. Link to comment Share on other sites More sharing options...
Ciscowrig Posted April 15, 2010 Author Share Posted April 15, 2010 No - If you can come up with the code to get it to work I'd be forever grateful. We're having to manually send the doc through outlook, which works, but is an extra, unnecessary step. Link to comment Share on other sites More sharing options...
olivierterlez Posted April 15, 2010 Share Posted April 15, 2010 I've foundAdd in line 758 in /Administrator/tabs/AdminOrders.php <input type="file" name="userfile1" size="20" class="input" /></p>If you need more files, duplicate the line and change the "name" or write a function. AdminOrders.php Link to comment Share on other sites More sharing options...
Ciscowrig Posted April 15, 2010 Author Share Posted April 15, 2010 No attachment comes through when I add it. Are you getting your attachments? Do I need to add a line in the mail file? Link to comment Share on other sites More sharing options...
Ciscowrig Posted April 15, 2010 Author Share Posted April 15, 2010 I have a feeling it has something to do with these lines... $message->message = htmlentities(Tools::getValue('message'), ENT_COMPAT, 'UTF-8'); '{message}' => (Configuration::get('PS_MAIL_TYPE') == 2 ? $message->message : nl2br2($message->message)) in that section I think something like this needs to be added, but nothing I've tried yet has worked... $message->userfile1 = htmlentities(Tools::getValue('userfile1'), ENT_COMPAT, 'UTF-8'); '{userfile1}' => (Configuration::get('PS_MAIL_TYPE') == 2 ? $userfile1->userfile1 : nl2br2($userfile1->userfile1)) Then in order_merchant_comment.html {userfile1} needs to be added in. This is where I'm caught up too. Is there a header code for attachments instead of dropping that {userfile1} just in the body. Link to comment Share on other sites More sharing options...
olivierterlez Posted April 22, 2010 Share Posted April 22, 2010 I still haven't foud.I think, a part of the answer is around lin 164if (Mail::Send(intval($order->id_lang), 'order_merchant_comment', $title, $varsTpl, $customer->email, $customer->firstname.' '.$customer->lastname))You can have a look at this :http://www.phpcs.com/code.aspx?ID=22574It's in french : the php form copy the file on the server, then attach it to the mail and delete the file on the serveri've tried it works, but how to include it in Prestashop ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now