TEMON Posted July 6, 2013 Share Posted July 6, 2013 (edited) Hello, Does anyone know to add attacment file to send a message to the customer. I think it's very necessary. We can send picture messages to customers following written messages related to items in the message by the customer from the back office. I have tried to add the file: / public_html / admin / themes / default / templates / controllers / orders / helpers / view / view.tpl <div style="float: left"> <form action="{$smarty.server.REQUEST_URI}&token={$smarty.get.token}" method="post" onsubmit="if (getE('visibility').checked == true) return confirm('{l s='Do you want to send this message to the customer?'}');"> <fieldset style="width: 1209px;"> <legend style="cursor: pointer;" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><img src="../img/admin/email_edit.gif" /> {l s='New message'}</legend> <div id="message_m" style="display: {if Tools::getValue('message')}none{else}block{/if}; overflow: auto; width: 400px;"> <a href="#" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><b>{l s='Click here'}</b> {l s='to add a comment or send a message to the customer.'}</a> </div> <a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}"><b>{l s='Click here'}</b> {l s='to see all messages.'}</a><br> <div id="message" style="display: {if Tools::getValue('message')}block{else}none{/if}"> <select name="order_message" id="order_message" onchange="orderOverwriteMessage(this, '{l s='Do you want to overwrite your existing message?'}')"> <option value="0" selected="selected">-- {l s='Choose a standard message'} --</option> {foreach from=$orderMessages item=orderMessage} <option value="{$orderMessage['message']|escape:'htmlall':'UTF-8'}">{$orderMessage['name']}</option> {/foreach} </select><br /><br /> <b>{l s='Display to customer?'}</b> <input type="radio" name="visibility" id="visibility" value="0" /> {l s='Yes'} <input type="radio" name="visibility" value="1" checked="checked" /> {l s='No'} <p id="nbchars" style="display:inline;font-size:10px;color:#666;"></p><br /><br /> <textarea id="txt_msg" name="message" cols="236" rows="8" onKeyUp="var length = document.getElementById('txt_msg').value.length; if (length > 600) length = '600+'; document.getElementById('nbchars').innerHTML = '{l s='600 characters, max.'} (' + length + ')';">{Tools::getValue('message')|escape:'htmlall':'UTF-8'}</textarea><br /><br /> <input type="hidden" name="id_order" value="{$order->id}" /> <input type="hidden" name="id_customer" value="{$order->id_customer}" /> <p class="text"> <label for="fileUpload">{l s='Attach File'}</label> <input type="hidden" name="MAX_FILE_SIZE" value="2000000"> <input type="file" name="fileUpload" id="fileUpload"> </p> <input type="submit" class="button" name="submitMessage" value="{l s='Send'}" style="margin-left: 578px"/> </div> </fieldset> </form> {if (sizeof($messages))} <br /> <fieldset style="width: 400px;"> <legend><img src="../img/admin/email.gif" /> {l s='Messages'}</legend> {foreach from=$messages item=message} <div style="overflow:auto; width:400px;" {if $message['is_new_for_me']}class="new_message"{/if}> {if ($message['is_new_for_me'])} <a class="new_message" title="{l s='Mark this message as \'viewed\''}" href="{$smarty.server.REQUEST_URI}&token={$smarty.get.token}&messageReaded={$message['id_message']}"><img src="../img/admin/enabled.gif" alt="" /></a> {/if} {l s='At'} <i>{dateFormat date=$message['date_add']} </i> {l s='from'} <b>{if ($message['elastname']|escape:'htmlall':'UTF-8')}{$message['efirstname']|escape:'htmlall':'UTF-8'} {$message['elastname']|escape:'htmlall':'UTF-8'}{else}{$message['cfirstname']|escape:'htmlall':'UTF-8'} {$message['clastname']|escape:'htmlall':'UTF-8'}{/if}</b> {if ($message['private'] == 1)}<span style="color:red; font-weight:bold;">{l s='Private'}</span>{/if} <p>{$message['message']|escape:'htmlall':'UTF-8'|nl2br}</p> </div> <br /> {/foreach} </fieldset> {/if} </div> In my screen back office (orders) is apparent, but the email you received regular customers not appear. Someone help me, please? Edited July 17, 2013 by TEMON (see edit history) 1 Link to comment Share on other sites More sharing options...
TEMON Posted July 15, 2013 Author Share Posted July 15, 2013 Someone help me please? Link to comment Share on other sites More sharing options...
kevin78 Posted August 6, 2013 Share Posted August 6, 2013 Hi Any news ? Im looking for the same ... Link to comment Share on other sites More sharing options...
navid68 Posted November 8, 2013 Share Posted November 8, 2013 Interesting for us, as well. I am not a programmer, Temon started the code and the concept looks very simple. Anyone can help? Link to comment Share on other sites More sharing options...
lovemyseo Posted August 23, 2014 Share Posted August 23, 2014 Hello, Does anyone know to add attacment file to send a message to the customer. I think it's very necessary. We can send picture messages to customers following written messages related to items in the message by the customer from the back office. I have tried to add the file: / public_html / admin / themes / default / templates / controllers / orders / helpers / view / view.tpl <div style="float: left"> <form action="{$smarty.server.REQUEST_URI}&token={$smarty.get.token}" method="post" onsubmit="if (getE('visibility').checked == true) return confirm('{l s='Do you want to send this message to the customer?'}');"> <fieldset style="width: 1209px;"> <legend style="cursor: pointer;" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><img src="../img/admin/email_edit.gif" /> {l s='New message'}</legend> <div id="message_m" style="display: {if Tools::getValue('message')}none{else}block{/if}; overflow: auto; width: 400px;"> <a href="#" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><b>{l s='Click here'}</b> {l s='to add a comment or send a message to the customer.'}</a> </div> <a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}"><b>{l s='Click here'}</b> {l s='to see all messages.'}</a><br> <div id="message" style="display: {if Tools::getValue('message')}block{else}none{/if}"> <select name="order_message" id="order_message" onchange="orderOverwriteMessage(this, '{l s='Do you want to overwrite your existing message?'}')"> <option value="0" selected="selected">-- {l s='Choose a standard message'} --</option> {foreach from=$orderMessages item=orderMessage} <option value="{$orderMessage['message']|escape:'htmlall':'UTF-8'}">{$orderMessage['name']}</option> {/foreach} </select><br /><br /> <b>{l s='Display to customer?'}</b> <input type="radio" name="visibility" id="visibility" value="0" /> {l s='Yes'} <input type="radio" name="visibility" value="1" checked="checked" /> {l s='No'} <p id="nbchars" style="display:inline;font-size:10px;color:#666;"></p><br /><br /> <textarea id="txt_msg" name="message" cols="236" rows="8" onKeyUp="var length = document.getElementById('txt_msg').value.length; if (length > 600) length = '600+'; document.getElementById('nbchars').innerHTML = '{l s='600 characters, max.'} (' + length + ')';">{Tools::getValue('message')|escape:'htmlall':'UTF-8'}</textarea><br /><br /> <input type="hidden" name="id_order" value="{$order->id}" /> <input type="hidden" name="id_customer" value="{$order->id_customer}" /> <p class="text"> <label for="fileUpload">{l s='Attach File'}</label> <input type="hidden" name="MAX_FILE_SIZE" value="2000000"> <input type="file" name="fileUpload" id="fileUpload"> </p> <input type="submit" class="button" name="submitMessage" value="{l s='Send'}" style="margin-left: 578px"/> </div> </fieldset> </form> {if (sizeof($messages))} <br /> <fieldset style="width: 400px;"> <legend><img src="../img/admin/email.gif" /> {l s='Messages'}</legend> {foreach from=$messages item=message} <div style="overflow:auto; width:400px;" {if $message['is_new_for_me']}class="new_message"{/if}> {if ($message['is_new_for_me'])} <a class="new_message" title="{l s='Mark this message as \'viewed\''}" href="{$smarty.server.REQUEST_URI}&token={$smarty.get.token}&messageReaded={$message['id_message']}"><img src="../img/admin/enabled.gif" alt="" /></a> {/if} {l s='At'} <i>{dateFormat date=$message['date_add']} </i> {l s='from'} <b>{if ($message['elastname']|escape:'htmlall':'UTF-8')}{$message['efirstname']|escape:'htmlall':'UTF-8'} {$message['elastname']|escape:'htmlall':'UTF-8'}{else}{$message['cfirstname']|escape:'htmlall':'UTF-8'} {$message['clastname']|escape:'htmlall':'UTF-8'}{/if}</b> {if ($message['private'] == 1)}<span style="color:red; font-weight:bold;">{l s='Private'}</span>{/if} <p>{$message['message']|escape:'htmlall':'UTF-8'|nl2br}</p> </div> <br /> {/foreach} </fieldset> {/if} </div> In my screen back office (orders) is apparent, but the email you received regular customers not appear. Someone help me, please? I am looking for something similar , actually this thing can put load on server and website peroframce to some extent I think thats why features or module not available yet Link to comment Share on other sites More sharing options...
jjryeste Posted November 17, 2014 Share Posted November 17, 2014 Hello, same proble, is possible , modify email for defect , and , add to email codigo attach Link to comment Share on other sites More sharing options...
Recommended Posts